@okta/odyssey-react-mui 1.35.4 → 1.36.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/dist/cjs/StringWithValue.cjs.map +1 -0
  2. package/dist/cjs/theme/useMediaQuery.cjs.map +1 -1
  3. package/dist/cjs/ui-shell/InnerAppContainer.cjs +1 -0
  4. package/dist/cjs/ui-shell/InnerAppContainer.cjs.map +1 -1
  5. package/dist/cjs/ui-shell/NarrowUiShellContent.cjs +1 -2
  6. package/dist/cjs/ui-shell/NarrowUiShellContent.cjs.map +1 -1
  7. package/dist/cjs/ui-shell/SideNav/SideNav.cjs +88 -59
  8. package/dist/cjs/ui-shell/SideNav/SideNav.cjs.map +1 -1
  9. package/dist/cjs/ui-shell/SideNav/types.cjs.map +1 -1
  10. package/dist/cjs/ui-shell/SideNav/useIsSideNavCollapsedSessionStorage.cjs +26 -0
  11. package/dist/cjs/ui-shell/SideNav/useIsSideNavCollapsedSessionStorage.cjs.map +1 -0
  12. package/dist/cjs/ui-shell/index.cjs +8 -1
  13. package/dist/cjs/ui-shell/index.cjs.map +1 -1
  14. package/dist/cjs/useMountLifecycleEffect.cjs +36 -0
  15. package/dist/cjs/useMountLifecycleEffect.cjs.map +1 -0
  16. package/dist/cjs/useSessionStorageState.cjs +64 -0
  17. package/dist/cjs/useSessionStorageState.cjs.map +1 -0
  18. package/dist/{index.js → cjs/web-component/odysseyWebComponentVersion.generated.cjs} +8 -14
  19. package/dist/cjs/web-component/odysseyWebComponentVersion.generated.cjs.map +1 -0
  20. package/dist/cjs/web-component/renderReactInWebComponent.cjs +53 -19
  21. package/dist/cjs/web-component/renderReactInWebComponent.cjs.map +1 -1
  22. package/dist/esm/StringWithValue.js.map +1 -0
  23. package/dist/esm/theme/useMediaQuery.js.map +1 -1
  24. package/dist/esm/ui-shell/InnerAppContainer.js +1 -0
  25. package/dist/esm/ui-shell/InnerAppContainer.js.map +1 -1
  26. package/dist/esm/ui-shell/NarrowUiShellContent.js +1 -2
  27. package/dist/esm/ui-shell/NarrowUiShellContent.js.map +1 -1
  28. package/dist/esm/ui-shell/SideNav/SideNav.js +88 -59
  29. package/dist/esm/ui-shell/SideNav/SideNav.js.map +1 -1
  30. package/dist/esm/ui-shell/SideNav/types.js.map +1 -1
  31. package/dist/esm/ui-shell/SideNav/useIsSideNavCollapsedSessionStorage.js +19 -0
  32. package/dist/esm/ui-shell/SideNav/useIsSideNavCollapsedSessionStorage.js.map +1 -0
  33. package/dist/esm/ui-shell/index.js +1 -1
  34. package/dist/esm/ui-shell/index.js.map +1 -1
  35. package/dist/esm/useMountLifecycleEffect.js +29 -0
  36. package/dist/esm/useMountLifecycleEffect.js.map +1 -0
  37. package/dist/esm/useSessionStorageState.js +56 -0
  38. package/dist/esm/useSessionStorageState.js.map +1 -0
  39. package/dist/esm/web-component/odysseyWebComponentVersion.generated.js +12 -0
  40. package/dist/esm/web-component/odysseyWebComponentVersion.generated.js.map +1 -0
  41. package/dist/esm/web-component/renderReactInWebComponent.js +49 -17
  42. package/dist/esm/web-component/renderReactInWebComponent.js.map +1 -1
  43. package/dist/tsconfig.production.tsbuildinfo +1 -1
  44. package/dist/types/StringWithValue.d.ts.map +1 -0
  45. package/dist/types/theme/useMediaQuery.d.ts +1 -1
  46. package/dist/types/theme/useMediaQuery.d.ts.map +1 -1
  47. package/dist/types/ui-shell/InnerAppContainer.d.ts.map +1 -1
  48. package/dist/types/ui-shell/NarrowUiShellContent.d.ts.map +1 -1
  49. package/dist/types/ui-shell/SideNav/SideNav.d.ts.map +1 -1
  50. package/dist/types/ui-shell/SideNav/types.d.ts +13 -4
  51. package/dist/types/ui-shell/SideNav/types.d.ts.map +1 -1
  52. package/dist/types/ui-shell/SideNav/useIsSideNavCollapsedSessionStorage.d.ts +17 -0
  53. package/dist/types/ui-shell/SideNav/useIsSideNavCollapsedSessionStorage.d.ts.map +1 -0
  54. package/dist/types/ui-shell/index.d.ts +1 -1
  55. package/dist/types/ui-shell/index.d.ts.map +1 -1
  56. package/dist/types/ui-shell/renderUiShell.d.ts +1 -1
  57. package/dist/types/useMountLifecycleEffect.d.ts +16 -0
  58. package/dist/types/useMountLifecycleEffect.d.ts.map +1 -0
  59. package/dist/types/useSessionStorageState.d.ts +20 -0
  60. package/dist/types/useSessionStorageState.d.ts.map +1 -0
  61. package/dist/types/web-component/odysseyWebComponentVersion.generated.d.ts +19 -0
  62. package/dist/types/web-component/odysseyWebComponentVersion.generated.d.ts.map +1 -0
  63. package/dist/types/web-component/renderReactInWebComponent.d.ts +29 -7
  64. package/dist/types/web-component/renderReactInWebComponent.d.ts.map +1 -1
  65. package/package.json +6 -5
  66. package/dist/cjs/theme/StringWithValue.cjs.map +0 -1
  67. package/dist/esm/theme/StringWithValue.js.map +0 -1
  68. package/dist/index.cjs +0 -231
  69. package/dist/index.d.ts +0 -22
  70. package/dist/index.d.ts.map +0 -1
  71. package/dist/index.mjs +0 -229
  72. package/dist/index.scss +0 -549
  73. package/dist/tsconfig.tsbuildinfo +0 -1
  74. package/dist/types/theme/StringWithValue.d.ts.map +0 -1
  75. /package/dist/cjs/{theme/StringWithValue.cjs → StringWithValue.cjs} +0 -0
  76. /package/dist/esm/{theme/StringWithValue.js → StringWithValue.js} +0 -0
  77. /package/dist/types/{theme/StringWithValue.d.ts → StringWithValue.d.ts} +0 -0
@@ -3,8 +3,10 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.renderReactInWebComponent = exports.reactWebComponentElementName = exports.ReactInWebComponentElement = void 0;
6
+ exports.webComponentDataAttributeName = exports.versionedWebComponentName = exports.renderReactInWebComponent = exports.getReactWebComponent = exports.WebComponentClass = void 0;
7
+ var _odysseyWebComponentVersionGenerated = _interopRequireDefault(require("./odysseyWebComponentVersion.generated.cjs"));
7
8
  var _createReactRootElements = require("./createReactRootElements.cjs");
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
8
10
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
9
11
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
10
12
  function __transformExtension(filepath, extMapping) {
@@ -37,28 +39,44 @@ function __transformExtension(filepath, extMapping) {
37
39
  * See the License for the specific language governing permissions and limitations under the License.
38
40
  */
39
41
 
40
- const reactWebComponentElementName = exports.reactWebComponentElementName = "odyssey-react-web-component";
42
+ const webComponentDataAttributeName = exports.webComponentDataAttributeName = "data-odyssey-react-web-component";
43
+ const versionedWebComponentName = exports.versionedWebComponentName = `odyssey-react-web-component-${_odysseyWebComponentVersionGenerated.default}`.toLowerCase();
41
44
  const SsrFriendlyHtmlElementClass = "HTMLElement" in globalThis ? HTMLElement : class {};
42
- class ReactInWebComponentElement extends SsrFriendlyHtmlElementClass {
45
+ class WebComponentClass extends SsrFriendlyHtmlElementClass {
46
+ #getReactComponent = null;
47
+ #reactRootElements;
48
+ elementName = this.localName;
43
49
  reactRootPromise = Promise.resolve(null);
44
- constructor(getReactComponent) {
50
+ constructor() {
45
51
  super();
46
- this.getReactComponent = getReactComponent;
47
- this.reactRootElements = (0, _createReactRootElements.createReactRootElements)();
48
- const styleElement = document.createElement("style");
52
+ this.#reactRootElements = (0, _createReactRootElements.createReactRootElements)();
53
+ const {
54
+ appRootElement,
55
+ stylesRootElement
56
+ } = this.#reactRootElements;
49
57
  const shadowRoot = this.attachShadow({
50
58
  mode: "open"
51
59
  });
52
- styleElement.innerHTML = `
60
+ shadowRoot.appendChild(stylesRootElement);
61
+ shadowRoot.appendChild(appRootElement);
62
+ const styleHostElement = document.createElement("style");
63
+ styleHostElement.setAttribute("nonce", window.cspNonce);
64
+ styleHostElement.innerHTML = `
53
65
  :host {
54
66
  all: initial;
55
67
  contain: content;
56
68
  }
57
69
  `;
58
- styleElement.setAttribute("nonce", window.cspNonce);
59
- this.reactRootElements.stylesRootElement.appendChild(styleElement);
60
- shadowRoot.appendChild(this.reactRootElements.stylesRootElement);
61
- shadowRoot.appendChild(this.reactRootElements.appRootElement);
70
+ stylesRootElement.appendChild(styleHostElement);
71
+ }
72
+ setGetReactComponent(getReactComponent) {
73
+ this.reactRootPromise = this.reactRootPromise.then(reactRoot => {
74
+ this.#getReactComponent = getReactComponent;
75
+ if (reactRoot) {
76
+ reactRoot.render(this.#getReactComponent(this.#reactRootElements));
77
+ } else {}
78
+ return reactRoot;
79
+ });
62
80
  }
63
81
  connectedCallback() {
64
82
  this.reactRootPromise = this.reactRootPromise.then(reactRoot => {
@@ -69,9 +87,11 @@ class ReactInWebComponentElement extends SsrFriendlyHtmlElementClass {
69
87
  ".js": ".cjs"
70
88
  })).then(({
71
89
  createRoot
72
- }) => createRoot(this.reactRootElements.appRootElement));
90
+ }) => createRoot(this.#reactRootElements.appRootElement));
73
91
  }).then(reactRoot => {
74
- reactRoot.render(this.getReactComponent(this.reactRootElements));
92
+ if (!this.#getReactComponent) {} else {
93
+ reactRoot.render(this.#getReactComponent(this.#reactRootElements));
94
+ }
75
95
  return reactRoot;
76
96
  });
77
97
  }
@@ -85,17 +105,31 @@ class ReactInWebComponentElement extends SsrFriendlyHtmlElementClass {
85
105
  });
86
106
  }
87
107
  }
88
- exports.ReactInWebComponentElement = ReactInWebComponentElement;
89
- if ("customElements" in globalThis && !customElements.get(reactWebComponentElementName)) {
90
- customElements.define(reactWebComponentElementName, ReactInWebComponentElement);
91
- }
108
+ exports.WebComponentClass = WebComponentClass;
109
+ const getReactWebComponent = ({
110
+ webComponentName = versionedWebComponentName,
111
+ getReactComponent
112
+ }) => {
113
+ if (!customElements.get(webComponentName)) {
114
+ customElements.define(webComponentName, WebComponentClass);
115
+ }
116
+ const element = document.createElement(webComponentName);
117
+ element.setAttribute(webComponentDataAttributeName, "");
118
+ element.setGetReactComponent(getReactComponent);
119
+ return element;
120
+ };
121
+ exports.getReactWebComponent = getReactWebComponent;
92
122
  const renderReactInWebComponent = ({
123
+ webComponentName,
93
124
  getReactComponent,
94
125
  webComponentChildren,
95
126
  webComponentParentElement,
96
127
  webComponentRootElement
97
128
  }) => {
98
- const reactElement = new ReactInWebComponentElement(getReactComponent);
129
+ const reactElement = getReactWebComponent({
130
+ getReactComponent,
131
+ webComponentName
132
+ });
99
133
  if (webComponentChildren) {
100
134
  (Array.isArray(webComponentChildren) ? webComponentChildren : [webComponentChildren]).forEach(webComponentChild => {
101
135
  reactElement.appendChild(webComponentChild);
@@ -1 +1 @@
1
- {"version":3,"file":"renderReactInWebComponent.cjs","names":["_createReactRootElements","require","_getRequireWildcardCache","e","WeakMap","r","t","_interopRequireWildcard","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","__transformExtension","filepath","extMapping","startsWith","idx","lastIndexOf","includes","newExt","origExt","entries","sort","b","length","endsWith","slice","reactWebComponentElementName","exports","SsrFriendlyHtmlElementClass","globalThis","HTMLElement","ReactInWebComponentElement","reactRootPromise","Promise","resolve","constructor","getReactComponent","reactRootElements","createReactRootElements","styleElement","document","createElement","shadowRoot","attachShadow","mode","innerHTML","setAttribute","window","cspNonce","stylesRootElement","appendChild","appRootElement","connectedCallback","then","reactRoot","Error","specifier","s","createRoot","render","disconnectedCallback","unmount","customElements","define","renderReactInWebComponent","webComponentChildren","webComponentParentElement","webComponentRootElement","reactElement","Array","isArray","forEach","webComponentChild"],"sources":["../../../src/web-component/renderReactInWebComponent.ts"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { type ReactNode } from \"react\";\nimport type { Root } from \"react-dom/client\";\n\nimport {\n createReactRootElements,\n type ReactRootElements,\n} from \"./createReactRootElements.js\";\n\nexport const reactWebComponentElementName = \"odyssey-react-web-component\";\n\nexport type GetReactComponentInWebComponent = (\n reactRootElements: ReactRootElements,\n) => ReactNode;\n\nconst SsrFriendlyHtmlElementClass =\n \"HTMLElement\" in globalThis\n ? HTMLElement\n : (class {} as unknown as typeof globalThis.HTMLElement);\n\nexport class ReactInWebComponentElement extends SsrFriendlyHtmlElementClass {\n getReactComponent: GetReactComponentInWebComponent;\n reactRootElements: ReactRootElements;\n reactRootPromise: Promise<Root | null> = Promise.resolve(null);\n\n constructor(getReactComponent: GetReactComponentInWebComponent) {\n super();\n\n this.getReactComponent = getReactComponent;\n this.reactRootElements = createReactRootElements();\n\n const styleElement = document.createElement(\"style\");\n const shadowRoot = this.attachShadow({ mode: \"open\" });\n\n styleElement.innerHTML = `\n :host {\n all: initial;\n contain: content;\n }\n `;\n\n styleElement.setAttribute(\"nonce\", window.cspNonce);\n\n this.reactRootElements.stylesRootElement.appendChild(styleElement);\n shadowRoot.appendChild(this.reactRootElements.stylesRootElement);\n shadowRoot.appendChild(this.reactRootElements.appRootElement);\n }\n\n connectedCallback() {\n this.reactRootPromise = this.reactRootPromise\n .then((reactRoot) => {\n if (reactRoot) {\n // Shouldn't ever happen\n throw new Error(\n `connectedCallback fired when reactRoot is already mounted.`,\n );\n }\n\n // Ensure react root is available before mounting\n // If we want to support React v17 in the future, we can use a try-catch on the import to grab the old `ReactDOM.render` function if `react-dom/client` errors. --Kevin Ghadyani\n return import(\"react-dom/client\").then(({ createRoot }) =>\n createRoot(this.reactRootElements.appRootElement),\n );\n })\n .then((reactRoot) => {\n reactRoot.render(this.getReactComponent(this.reactRootElements));\n return reactRoot;\n });\n }\n\n disconnectedCallback() {\n this.reactRootPromise = this.reactRootPromise.then((reactRoot) => {\n if (!reactRoot) {\n // Shouldn't ever happen\n throw new Error(\n `disconnectedCallback fired when reactRoot is already unmounted.`,\n );\n }\n\n reactRoot.unmount();\n // Set root to null. We don't want to attempt to render to a root that's already been unmounted.\n return null;\n });\n }\n}\n\nif (\n \"customElements\" in globalThis &&\n !customElements.get(reactWebComponentElementName)\n) {\n customElements.define(\n reactWebComponentElementName,\n ReactInWebComponentElement,\n );\n}\n\nexport type RenderReactInWebComponentProps = {\n /**\n * This is a callback function for rendering your React component or app in the Web Component.\n * It gives you access to the Shadow DOM elements if you need them for Odyssey, Emotion, or MUI.\n *\n * You will need to add `<slot>` elements if you want to pass child elements or components or React apps.\n * You can have multiple slots in your app if you add a `name` attribute to your `<slot>` elements.\n */\n getReactComponent: GetReactComponentInWebComponent;\n /**\n * One or more HTML elements that are going to render as `children` of the web component.\n * If your React component doesn't take children, this is unnecessary.\n *\n * Typically, a React app root element is passed, but it can include an array of other elements if there are multiple slots for children.\n *\n * You will need to have rendered `<slot>` elements in your React component or `children` won't show up.\n */\n webComponentChildren?: HTMLElement | HTMLElement[];\n} & (\n | {\n /**\n * The React app renders in the web component, but the web component needs to be rendered in the document.\n *\n * This is the element the web component is rendered into.\n */\n webComponentParentElement: HTMLElement;\n webComponentRootElement?: never;\n }\n | {\n webComponentParentElement?: HTMLElement;\n /**\n * @deprecated Use `webComponentParentElement` instead.\n */\n webComponentRootElement: HTMLElement;\n }\n);\n\n/**\n * Lets you render React apps or components in a Web Component.\n *\n * This is useful when global styles are causing conflicts with your React components.\n */\nexport const renderReactInWebComponent = ({\n getReactComponent,\n webComponentChildren,\n webComponentParentElement,\n webComponentRootElement,\n}: RenderReactInWebComponentProps) => {\n const reactElement = new ReactInWebComponentElement(getReactComponent);\n\n if (webComponentChildren) {\n (Array.isArray(webComponentChildren)\n ? webComponentChildren\n : [webComponentChildren]\n ).forEach((webComponentChild) => {\n reactElement.appendChild(webComponentChild);\n });\n }\n\n if (webComponentParentElement) {\n webComponentParentElement.appendChild(reactElement);\n }\n // Remove this condition when `webComponentRootElement` is no longer a prop.\n else if (webComponentRootElement) {\n webComponentRootElement.appendChild(reactElement);\n }\n\n return reactElement;\n};\n"],"mappings":";;;;;;AAeA,IAAAA,wBAAA,GAAAC,OAAA;AAGsC,SAAAC,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAI,wBAAAJ,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAM,OAAA,EAAAN,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAI,GAAA,CAAAP,CAAA,UAAAG,CAAA,CAAAK,GAAA,CAAAR,CAAA,OAAAS,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAf,CAAA,oBAAAe,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAjB,CAAA,EAAAe,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAd,CAAA,EAAAe,CAAA,UAAAG,CAAA,KAAAA,CAAA,CAAAV,GAAA,IAAAU,CAAA,CAAAC,GAAA,IAAAP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C7C,CAAC,CAAC;EACJ;EAEA,IAAIN,yBAAyB,EAAE;IAC7BA,yBAAyB,CAAChB,WAAW,CAACkB,YAAY,CAAC;EACrD,CAAC,MAEI,IAAID,uBAAuB,EAAE;IAChCA,uBAAuB,CAACjB,WAAW,CAACkB,YAAY,CAAC;EACnD;EAEA,OAAOA,YAAY;AACrB,CAAC;AAACzC,OAAA,CAAAqC,yBAAA,GAAAA,yBAAA","ignoreList":[]}
1
+ {"version":3,"file":"renderReactInWebComponent.cjs","names":["_odysseyWebComponentVersionGenerated","_interopRequireDefault","require","_createReactRootElements","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","_interopRequireWildcard","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","__transformExtension","filepath","extMapping","startsWith","idx","lastIndexOf","includes","newExt","origExt","entries","sort","b","length","endsWith","slice","webComponentDataAttributeName","exports","versionedWebComponentName","version","toLowerCase","SsrFriendlyHtmlElementClass","globalThis","HTMLElement","WebComponentClass","getReactComponent","reactRootElements","elementName","localName","reactRootPromise","Promise","resolve","constructor","createReactRootElements","appRootElement","stylesRootElement","shadowRoot","attachShadow","mode","appendChild","styleHostElement","document","createElement","setAttribute","window","cspNonce","innerHTML","setGetReactComponent","then","reactRoot","render","connectedCallback","Error","specifier","s","createRoot","disconnectedCallback","unmount","getReactWebComponent","webComponentName","customElements","define","element","renderReactInWebComponent","webComponentChildren","webComponentParentElement","webComponentRootElement","reactElement","Array","isArray","forEach","webComponentChild"],"sources":["../../../src/web-component/renderReactInWebComponent.ts"],"sourcesContent":["/*!\n * Copyright (c) 2024-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { type ReactNode } from \"react\";\nimport type { Root } from \"react-dom/client\";\nimport version from \"./odysseyWebComponentVersion.generated.js\";\n\nimport {\n createReactRootElements,\n type ReactRootElements,\n} from \"./createReactRootElements.js\";\n\ninterface GetReactWebComponentOptions {\n webComponentName?: string;\n getReactComponent: (reactRootElements: ReactRootElements) => ReactNode;\n}\n\n// Used by selenium when selecting for odyssey web components regardless of their name.\nexport const webComponentDataAttributeName = \"data-odyssey-react-web-component\";\n// Unique name to avoid multiple versions of odyssey overwriting each other's implementations\nexport const versionedWebComponentName =\n `odyssey-react-web-component-${version}`.toLowerCase();\n\nconst SsrFriendlyHtmlElementClass =\n \"HTMLElement\" in globalThis\n ? HTMLElement\n : (class {} as unknown as typeof globalThis.HTMLElement);\n\nexport class WebComponentClass extends SsrFriendlyHtmlElementClass {\n #getReactComponent: GetReactComponentInWebComponent | null = null;\n readonly #reactRootElements: ReactRootElements;\n public readonly elementName: string = this.localName;\n // public for testing\n public reactRootPromise: Promise<Root | null> = Promise.resolve(null);\n\n constructor() {\n super();\n\n this.#reactRootElements = createReactRootElements();\n const { appRootElement, stylesRootElement } = this.#reactRootElements;\n\n const shadowRoot = this.attachShadow({ mode: \"open\" });\n shadowRoot.appendChild(stylesRootElement);\n shadowRoot.appendChild(appRootElement);\n\n const styleHostElement = document.createElement(\"style\");\n styleHostElement.setAttribute(\"nonce\", window.cspNonce);\n styleHostElement.innerHTML = `\n :host {\n all: initial;\n contain: content;\n }\n `;\n stylesRootElement.appendChild(styleHostElement);\n }\n\n /**\n * Provides the function used to initialize react content that is specific to this instance\n * of the web component, which is used later in the connectedCallback.\n *\n * Always set immediately after creation via document.createElement\n */\n setGetReactComponent(getReactComponent: GetReactComponentInWebComponent) {\n this.reactRootPromise = this.reactRootPromise.then((reactRoot) => {\n this.#getReactComponent = getReactComponent;\n if (reactRoot) {\n // connectedCallback has already been fired. Need to mount this content to the existing root\n reactRoot.render(this.#getReactComponent(this.#reactRootElements));\n } else {\n // Nothing to do. Content will be mounted when connectedCallback is called\n }\n\n return reactRoot;\n });\n }\n\n connectedCallback() {\n this.reactRootPromise = this.reactRootPromise\n .then((reactRoot) => {\n if (reactRoot) {\n // Shouldn't ever happen. connected and disconnected should never be called out of order\n throw new Error(\n `connectedCallback fired when reactRoot is already mounted.`,\n );\n }\n\n // Ensure react root is available before mounting\n // If we want to support React v17 in the future, we can use a try-catch on the import to grab the old `ReactDOM.render` function if `react-dom/client` errors. --Kevin Ghadyani\n return import(\"react-dom/client\").then(({ createRoot }) =>\n createRoot(this.#reactRootElements.appRootElement),\n );\n })\n .then((reactRoot) => {\n if (!this.#getReactComponent) {\n // getReactComponent hasn't been set yet. Content will be mounted once it's set.\n } else {\n reactRoot.render(this.#getReactComponent(this.#reactRootElements));\n }\n return reactRoot;\n });\n }\n\n disconnectedCallback() {\n this.reactRootPromise = this.reactRootPromise.then((reactRoot) => {\n if (!reactRoot) {\n // Shouldn't ever happen\n throw new Error(\n `disconnectedCallback fired when reactRoot is already unmounted.`,\n );\n }\n\n reactRoot.unmount();\n // Set root to null. We don't want to attempt to render to a root that's already been unmounted.\n return null;\n });\n }\n}\n\n/**\n * Returns a constructed web component which manages it's own shadow dom and react dom roots\n * A custom name can be specified, otherwise a default is provided\n */\nexport const getReactWebComponent = ({\n webComponentName = versionedWebComponentName,\n getReactComponent,\n}: GetReactWebComponentOptions) => {\n // This name hasn't been defined yet. Add a definition for it before constructing one.\n if (!customElements.get(webComponentName)) {\n customElements.define(webComponentName, WebComponentClass);\n }\n\n const element = document.createElement(webComponentName) as InstanceType<\n typeof WebComponentClass\n >;\n // Set selenium attribute so this can be selected\n element.setAttribute(webComponentDataAttributeName, \"\");\n // function used for creating react content\n element.setGetReactComponent(getReactComponent);\n return element;\n};\n\nexport type GetReactComponentInWebComponent = (\n reactRootElements: ReactRootElements,\n) => ReactNode;\n\nexport type RenderReactInWebComponentProps = {\n /**\n * Optional name given to this web component.\n * Defaults to a 'odyssey-react-wc-' plus the current odyssey version\n */\n webComponentName?: string;\n /**\n * This is a callback function for rendering your React component or app in the Web Component.\n * It gives you access to the Shadow DOM elements if you need them for Odyssey, Emotion, or MUI.\n *\n * You will need to add `<slot>` elements if you want to pass child elements or components or React apps.\n * You can have multiple slots in your app if you add a `name` attribute to your `<slot>` elements.\n */\n getReactComponent: GetReactComponentInWebComponent;\n /**\n * One or more HTML elements that are going to render as `children` of the web component.\n * If your React component doesn't take children, this is unnecessary.\n *\n * Typically, a React app root element is passed, but it can include an array of other elements if there are multiple slots for children.\n *\n * You will need to have rendered `<slot>` elements in your React component or `children` won't show up.\n */\n webComponentChildren?: HTMLElement | HTMLElement[];\n} & (\n | {\n /**\n * The React app renders in the web component, but the web component needs to be rendered in the document.\n *\n * This is the element the web component is rendered into.\n */\n webComponentParentElement: HTMLElement;\n webComponentRootElement?: never;\n }\n | {\n webComponentParentElement?: HTMLElement;\n /**\n * @deprecated Use `webComponentParentElement` instead.\n */\n webComponentRootElement: HTMLElement;\n }\n);\n\n/**\n * Lets you render React apps or components in a Web Component.\n *\n * This is useful when global styles are causing conflicts with your React components.\n */\nexport const renderReactInWebComponent = ({\n webComponentName,\n getReactComponent,\n webComponentChildren,\n webComponentParentElement,\n webComponentRootElement,\n}: RenderReactInWebComponentProps) => {\n const reactElement = getReactWebComponent({\n getReactComponent,\n webComponentName,\n });\n\n if (webComponentChildren) {\n (Array.isArray(webComponentChildren)\n ? webComponentChildren\n : [webComponentChildren]\n ).forEach((webComponentChild) => {\n reactElement.appendChild(webComponentChild);\n });\n }\n\n if (webComponentParentElement) {\n webComponentParentElement.appendChild(reactElement);\n }\n // Remove this condition when `webComponentRootElement` is no longer a prop.\n else if (webComponentRootElement) {\n webComponentRootElement.appendChild(reactElement);\n }\n\n return reactElement;\n};\n"],"mappings":";;;;;;AAcA,IAAAA,oCAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,wBAAA,GAAA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EnC,iBAAiB,CAAC;EAC5D;EAEA,MAAMsC,OAAO,GAAGrB,QAAQ,CAACC,aAAa,CAACiB,gBAAgB,CAEtD;EAEDG,OAAO,CAACnB,YAAY,CAAC3B,6BAA6B,EAAE,EAAE,CAAC;EAEvD8C,OAAO,CAACf,oBAAoB,CAACtB,iBAAiB,CAAC;EAC/C,OAAOqC,OAAO;AAChB,CAAC;AAAC7C,OAAA,CAAAyC,oBAAA,GAAAA,oBAAA;AAqDK,MAAMK,yBAAyB,GAAGA,CAAC;EACxCJ,gBAAgB;EAChBlC,iBAAiB;EACjBuC,oBAAoB;EACpBC,yBAAyB;EACzBC;AAC8B,CAAC,KAAK;EACpC,MAAMC,YAAY,GAAGT,oBAAoB,CAAC;IACxCjC,iBAAiB;IACjBkC;EACF,CAAC,CAAC;EAEF,IAAIK,oBAAoB,EAAE;IACxB,CAACI,KAAK,CAACC,OAAO,CAACL,oBAAoB,CAAC,GAChCA,oBAAoB,GACpB,CAACA,oBAAoB,CAAC,EACxBM,OAAO,CAAEC,iBAAiB,IAAK;MAC/BJ,YAAY,CAAC5B,WAAW,CAACgC,iBAAiB,CAAC;IAC7C,CAAC,CAAC;EACJ;EAEA,IAAIN,yBAAyB,EAAE;IAC7BA,yBAAyB,CAAC1B,WAAW,CAAC4B,YAAY,CAAC;EACrD,CAAC,MAEI,IAAID,uBAAuB,EAAE;IAChCA,uBAAuB,CAAC3B,WAAW,CAAC4B,YAAY,CAAC;EACnD;EAEA,OAAOA,YAAY;AACrB,CAAC;AAAClD,OAAA,CAAA8C,yBAAA,GAAAA,yBAAA","ignoreList":[]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StringWithValue.js","names":[],"sources":["../../src/StringWithValue.ts"],"sourcesContent":["/*!\n * Copyright (c) 2025-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nexport type StringWithValue<T extends string> = T extends \"\" ? never : T;\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"useMediaQuery.js","names":["useCallback","useEffect","useMemo","useState","useMediaQuery","mediaQuery","mediaQueryList","window","matchMedia","hasMatches","setHasMatches","matches","updateHasMatches","event","addEventListener","removeEventListener"],"sources":["../../../src/theme/useMediaQuery.ts"],"sourcesContent":["/*!\n * Copyright (c) 2025-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { useCallback, useEffect, useMemo, useState } from \"react\";\n\nimport { StringWithValue } from \"./StringWithValue.js\";\n\nexport const useMediaQuery = <MediaQuery extends string>(\n mediaQuery: StringWithValue<MediaQuery>,\n) => {\n const mediaQueryList = useMemo(\n () => window.matchMedia(mediaQuery),\n [mediaQuery],\n );\n\n const [hasMatches, setHasMatches] = useState(() => mediaQueryList.matches);\n\n const updateHasMatches = useCallback(\n (event: MediaQueryListEvent | MediaQueryList) =>\n setHasMatches(event.matches),\n [],\n );\n\n useEffect(() => {\n mediaQueryList.addEventListener(\"change\", updateHasMatches);\n\n updateHasMatches(mediaQueryList);\n\n return () => {\n mediaQueryList.removeEventListener(\"change\", updateHasMatches);\n };\n }, [mediaQueryList, updateHasMatches]);\n\n return hasMatches;\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAIjE,OAAO,MAAMC,aAAa,GACxBC,UAAuC,IACpC;EACH,MAAMC,cAAc,GAAGJ,OAAO,CAC5B,MAAMK,MAAM,CAACC,UAAU,CAACH,UAAU,CAAC,EACnC,CAACA,UAAU,CACb,CAAC;EAED,MAAM,CAACI,UAAU,EAAEC,aAAa,CAAC,GAAGP,QAAQ,CAAC,MAAMG,cAAc,CAACK,OAAO,CAAC;EAE1E,MAAMC,gBAAgB,GAAGZ,WAAW,CACjCa,KAA2C,IAC1CH,aAAa,CAACG,KAAK,CAACF,OAAO,CAAC,EAC9B,EACF,CAAC;EAEDV,SAAS,CAAC,MAAM;IACdK,cAAc,CAACQ,gBAAgB,CAAC,QAAQ,EAAEF,gBAAgB,CAAC;IAE3DA,gBAAgB,CAACN,cAAc,CAAC;IAEhC,OAAO,MAAM;MACXA,cAAc,CAACS,mBAAmB,CAAC,QAAQ,EAAEH,gBAAgB,CAAC;IAChE,CAAC;EACH,CAAC,EAAE,CAACN,cAAc,EAAEM,gBAAgB,CAAC,CAAC;EAEtC,OAAOH,UAAU;AACnB,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"useMediaQuery.js","names":["useCallback","useEffect","useMemo","useState","useMediaQuery","mediaQuery","mediaQueryList","window","matchMedia","hasMatches","setHasMatches","matches","updateHasMatches","event","addEventListener","removeEventListener"],"sources":["../../../src/theme/useMediaQuery.ts"],"sourcesContent":["/*!\n * Copyright (c) 2025-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { useCallback, useEffect, useMemo, useState } from \"react\";\n\nimport { StringWithValue } from \"../StringWithValue.js\";\n\nexport const useMediaQuery = <MediaQuery extends string>(\n mediaQuery: StringWithValue<MediaQuery>,\n) => {\n const mediaQueryList = useMemo(\n () => window.matchMedia(mediaQuery),\n [mediaQuery],\n );\n\n const [hasMatches, setHasMatches] = useState(() => mediaQueryList.matches);\n\n const updateHasMatches = useCallback(\n (event: MediaQueryListEvent | MediaQueryList) =>\n setHasMatches(event.matches),\n [],\n );\n\n useEffect(() => {\n mediaQueryList.addEventListener(\"change\", updateHasMatches);\n\n updateHasMatches(mediaQueryList);\n\n return () => {\n mediaQueryList.removeEventListener(\"change\", updateHasMatches);\n };\n }, [mediaQueryList, updateHasMatches]);\n\n return hasMatches;\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAIjE,OAAO,MAAMC,aAAa,GACxBC,UAAuC,IACpC;EACH,MAAMC,cAAc,GAAGJ,OAAO,CAC5B,MAAMK,MAAM,CAACC,UAAU,CAACH,UAAU,CAAC,EACnC,CAACA,UAAU,CACb,CAAC;EAED,MAAM,CAACI,UAAU,EAAEC,aAAa,CAAC,GAAGP,QAAQ,CAAC,MAAMG,cAAc,CAACK,OAAO,CAAC;EAE1E,MAAMC,gBAAgB,GAAGZ,WAAW,CACjCa,KAA2C,IAC1CH,aAAa,CAACG,KAAK,CAACF,OAAO,CAAC,EAC9B,EACF,CAAC;EAEDV,SAAS,CAAC,MAAM;IACdK,cAAc,CAACQ,gBAAgB,CAAC,QAAQ,EAAEF,gBAAgB,CAAC;IAE3DA,gBAAgB,CAACN,cAAc,CAAC;IAEhC,OAAO,MAAM;MACXA,cAAc,CAACS,mBAAmB,CAAC,QAAQ,EAAEH,gBAAgB,CAAC;IAChE,CAAC;EACH,CAAC,EAAE,CAACN,cAAc,EAAEM,gBAAgB,CAAC,CAAC;EAEtC,OAAOH,UAAU;AACnB,CAAC","ignoreList":[]}
@@ -16,6 +16,7 @@ import { UI_SHELL_BASE_Z_INDEX } from "./uiShellSharedConstants.js";
16
16
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
17
17
  const StyledAppContainerShadowShared = styled("div")({
18
18
  left: 0,
19
+ pointerEvents: "none",
19
20
  position: "absolute",
20
21
  top: 0,
21
22
  width: "100%",
@@ -1 +1 @@
1
- {"version":3,"file":"InnerAppContainer.js","names":["styled","memo","UI_SHELL_BASE_Z_INDEX","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","StyledAppContainerShadowShared","left","position","top","width","zIndex","StyledAppContainerShadow1","background","height","StyledAppContainerShadow2","StyledAppContainerShadow3","InnerAppContainer","isContentScrolled","children","MemoizedInnerAppContainer","displayName"],"sources":["../../../src/ui-shell/InnerAppContainer.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2025-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport styled from \"@emotion/styled\";\nimport { memo } from \"react\";\nimport { UI_SHELL_BASE_Z_INDEX } from \"./uiShellSharedConstants.js\";\n\n// Shared styles for fake inset shadow. Not rendered anywhere.\nconst StyledAppContainerShadowShared = styled(\"div\")({\n left: 0,\n position: \"absolute\",\n top: 0,\n width: \"100%\",\n zIndex: UI_SHELL_BASE_Z_INDEX,\n});\n\nexport const StyledAppContainerShadow1 = styled(StyledAppContainerShadowShared)(\n {\n background: `linear-gradient(\n to bottom,\n rgba(39, 39, 39, 0.08) 0%,\n transparent 100%\n )`,\n height: \"4px\",\n },\n);\n\nexport const StyledAppContainerShadow2 = styled(StyledAppContainerShadowShared)(\n {\n background: `linear-gradient(\n to bottom,\n rgba(39, 39, 39, 0.01) 0%,\n transparent 100%\n )`,\n height: \"6px\",\n },\n);\n\nexport const StyledAppContainerShadow3 = styled(StyledAppContainerShadowShared)(\n {\n background: `linear-gradient(\n to bottom,\n rgba(39, 39, 39, 0.05) 0%,\n transparent 100%\n )`,\n height: \"15px\",\n },\n);\n\nexport type InnerAppContainerProps = {\n isContentScrolled: boolean;\n};\n\nconst InnerAppContainer = ({ isContentScrolled }: InnerAppContainerProps) =>\n isContentScrolled ? (\n <>\n <StyledAppContainerShadow1 />\n <StyledAppContainerShadow2 />\n <StyledAppContainerShadow3 />\n </>\n ) : null;\n\nconst MemoizedInnerAppContainer = memo(InnerAppContainer);\nMemoizedInnerAppContainer.displayName = \"InnerAppContainer\";\n\nexport { MemoizedInnerAppContainer as InnerAppContainer };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,MAAM,MAAM,iBAAiB;AACpC,SAASC,IAAI,QAAQ,OAAO;AAC5B,SAASC,qBAAqB,QAAQ,6BAA6B;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAGpE,MAAMC,8BAA8B,GAAGT,MAAM,CAAC,KAAK,CAAC,CAAC;EACnDU,IAAI,EAAE,CAAC;EACPC,QAAQ,EAAE,UAAU;EACpBC,GAAG,EAAE,CAAC;EACNC,KAAK,EAAE,MAAM;EACbC,MAAM,EAAEZ;AACV,CAAC,CAAC;AAEF,OAAO,MAAMa,yBAAyB,GAAGf,MAAM,CAACS,8BAA8B,CAAC,CAC7E;EACEO,UAAU,EAAE;AAChB;AACA;AACA;AACA,MAAM;EACFC,MAAM,EAAE;AACV,CACF,CAAC;AAED,OAAO,MAAMC,yBAAyB,GAAGlB,MAAM,CAACS,8BAA8B,CAAC,CAC7E;EACEO,UAAU,EAAE;AAChB;AACA;AACA;AACA,MAAM;EACFC,MAAM,EAAE;AACV,CACF,CAAC;AAED,OAAO,MAAME,yBAAyB,GAAGnB,MAAM,CAACS,8BAA8B,CAAC,CAC7E;EACEO,UAAU,EAAE;AAChB;AACA;AACA;AACA,MAAM;EACFC,MAAM,EAAE;AACV,CACF,CAAC;AAMD,MAAMG,iBAAiB,GAAGA,CAAC;EAAEC;AAA0C,CAAC,KACtEA,iBAAiB,GACfb,KAAA,CAAAF,SAAA;EAAAgB,QAAA,GACElB,IAAA,CAACW,yBAAyB,IAAE,CAAC,EAC7BX,IAAA,CAACc,yBAAyB,IAAE,CAAC,EAC7Bd,IAAA,CAACe,yBAAyB,IAAE,CAAC;AAAA,CAC7B,CAAC,GACD,IAAI;AAEV,MAAMI,yBAAyB,GAAGtB,IAAI,CAACmB,iBAAiB,CAAC;AACzDG,yBAAyB,CAACC,WAAW,GAAG,mBAAmB;AAE3D,SAASD,yBAAyB,IAAIH,iBAAiB","ignoreList":[]}
1
+ {"version":3,"file":"InnerAppContainer.js","names":["styled","memo","UI_SHELL_BASE_Z_INDEX","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","StyledAppContainerShadowShared","left","pointerEvents","position","top","width","zIndex","StyledAppContainerShadow1","background","height","StyledAppContainerShadow2","StyledAppContainerShadow3","InnerAppContainer","isContentScrolled","children","MemoizedInnerAppContainer","displayName"],"sources":["../../../src/ui-shell/InnerAppContainer.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2025-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport styled from \"@emotion/styled\";\nimport { memo } from \"react\";\nimport { UI_SHELL_BASE_Z_INDEX } from \"./uiShellSharedConstants.js\";\n\n// Shared styles for fake inset shadow. Not rendered anywhere.\nconst StyledAppContainerShadowShared = styled(\"div\")({\n left: 0,\n pointerEvents: \"none\",\n position: \"absolute\",\n top: 0,\n width: \"100%\",\n zIndex: UI_SHELL_BASE_Z_INDEX,\n});\n\nexport const StyledAppContainerShadow1 = styled(StyledAppContainerShadowShared)(\n {\n background: `linear-gradient(\n to bottom,\n rgba(39, 39, 39, 0.08) 0%,\n transparent 100%\n )`,\n height: \"4px\",\n },\n);\n\nexport const StyledAppContainerShadow2 = styled(StyledAppContainerShadowShared)(\n {\n background: `linear-gradient(\n to bottom,\n rgba(39, 39, 39, 0.01) 0%,\n transparent 100%\n )`,\n height: \"6px\",\n },\n);\n\nexport const StyledAppContainerShadow3 = styled(StyledAppContainerShadowShared)(\n {\n background: `linear-gradient(\n to bottom,\n rgba(39, 39, 39, 0.05) 0%,\n transparent 100%\n )`,\n height: \"15px\",\n },\n);\n\nexport type InnerAppContainerProps = {\n isContentScrolled: boolean;\n};\n\nconst InnerAppContainer = ({ isContentScrolled }: InnerAppContainerProps) =>\n isContentScrolled ? (\n <>\n <StyledAppContainerShadow1 />\n <StyledAppContainerShadow2 />\n <StyledAppContainerShadow3 />\n </>\n ) : null;\n\nconst MemoizedInnerAppContainer = memo(InnerAppContainer);\nMemoizedInnerAppContainer.displayName = \"InnerAppContainer\";\n\nexport { MemoizedInnerAppContainer as InnerAppContainer };\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,MAAM,MAAM,iBAAiB;AACpC,SAASC,IAAI,QAAQ,OAAO;AAC5B,SAASC,qBAAqB,QAAQ,6BAA6B;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAGpE,MAAMC,8BAA8B,GAAGT,MAAM,CAAC,KAAK,CAAC,CAAC;EACnDU,IAAI,EAAE,CAAC;EACPC,aAAa,EAAE,MAAM;EACrBC,QAAQ,EAAE,UAAU;EACpBC,GAAG,EAAE,CAAC;EACNC,KAAK,EAAE,MAAM;EACbC,MAAM,EAAEb;AACV,CAAC,CAAC;AAEF,OAAO,MAAMc,yBAAyB,GAAGhB,MAAM,CAACS,8BAA8B,CAAC,CAC7E;EACEQ,UAAU,EAAE;AAChB;AACA;AACA;AACA,MAAM;EACFC,MAAM,EAAE;AACV,CACF,CAAC;AAED,OAAO,MAAMC,yBAAyB,GAAGnB,MAAM,CAACS,8BAA8B,CAAC,CAC7E;EACEQ,UAAU,EAAE;AAChB;AACA;AACA;AACA,MAAM;EACFC,MAAM,EAAE;AACV,CACF,CAAC;AAED,OAAO,MAAME,yBAAyB,GAAGpB,MAAM,CAACS,8BAA8B,CAAC,CAC7E;EACEQ,UAAU,EAAE;AAChB;AACA;AACA;AACA,MAAM;EACFC,MAAM,EAAE;AACV,CACF,CAAC;AAMD,MAAMG,iBAAiB,GAAGA,CAAC;EAAEC;AAA0C,CAAC,KACtEA,iBAAiB,GACfd,KAAA,CAAAF,SAAA;EAAAiB,QAAA,GACEnB,IAAA,CAACY,yBAAyB,IAAE,CAAC,EAC7BZ,IAAA,CAACe,yBAAyB,IAAE,CAAC,EAC7Bf,IAAA,CAACgB,yBAAyB,IAAE,CAAC;AAAA,CAC7B,CAAC,GACD,IAAI;AAEV,MAAMI,yBAAyB,GAAGvB,IAAI,CAACoB,iBAAiB,CAAC;AACzDG,yBAAyB,CAACC,WAAW,GAAG,mBAAmB;AAE3D,SAASD,yBAAyB,IAAIH,iBAAiB","ignoreList":[]}
@@ -39,7 +39,6 @@ const StyledAppContentArea = styled("div")({
39
39
  gridTemplateColumns: "auto 1fr auto",
40
40
  gridTemplateRows: "1fr",
41
41
  height: "100%",
42
- pointerEvents: "none",
43
42
  width: "100%"
44
43
  });
45
44
  const StyledAppContainer = styled("div", {
@@ -48,8 +47,8 @@ const StyledAppContainer = styled("div", {
48
47
  appBackgroundColor
49
48
  }) => ({
50
49
  backgroundColor: appBackgroundColor,
51
- height: "100%",
52
50
  gridArea: "app-container",
51
+ height: "100%",
53
52
  overflow: "hidden",
54
53
  width: "100%"
55
54
  }));
@@ -1 +1 @@
1
- {"version":3,"file":"NarrowUiShellContent.js","names":["styled","memo","useCallback","useEffect","useRef","useState","ErrorBoundary","Button","CloseIcon","MoreIcon","InnerAppContainer","useOdysseyDesignTokens","SideNav","SideNavLogo","HamburgerMenuIcon","useUiShellContext","emptySideNavItems","SIDE_NAV_WIDTH","TOP_NAV_HEIGHT","UI_SHELL_BASE_Z_INDEX","useScrollState","useMatchAppElementToUiShellAppArea","hexToRgb","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","StyledAppContentArea","gridArea","position","display","gridGap","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","height","pointerEvents","width","StyledAppContainer","shouldForwardProp","prop","appBackgroundColor","backgroundColor","overflow","StyledBannersContainer","zIndex","StyledLeftSideContainer","isOpen","overflowY","StyledRightSideContainer","odysseyDesignTokens","HueNeutralWhite","maxWidth","right","StyledMenuLogo","alignItems","gap","Spacing3","StyledLogoContainer","paddingBlock","Spacing4","maxHeight","StyledPageOverlay","HueNeutral900","asFormattedString","replace","left","top","StyledSideNavContainer","StyledUiShellContainer","HueNeutral50","StyledTopNav","isContentScrolled","topNavBackgroundColor","boxShadow","DepthMedium","undefined","clipPath","flexDirection","justifyContent","transition","TransitionDurationMain","TransitionTimingMain","StyledTopNavMenu","minHeight","Spacing2","paddingInline","borderBottomColor","HueNeutral100","borderBottomStyle","BorderStyleMain","borderBottomWidth","BorderWidthMain","StyledTopNavSearch","NarrowUiShellContent","appElement","appElementScrollingMode","hasStandardAppContentPadding","initialVisibleSections","onError","console","error","optionalComponents","sideNavProps","topNavProps","uiShellContext","sideNavContainerRef","topNavContainerRef","uiShellAppAreaRef","isLeftSideMenuOpen","setIsLeftSideMenuOpen","isRightSideMenuOpen","setIsRightSideMenuOpen","closeSideMenus","unsubscribeFromCloseRightSideMenu","subscribeToCloseRightSideMenu","unsubscribeFromSideNavItemClicked","subscribeToCloseSideNavMenu","toggleLeftSideMenu","toggleRightSideMenu","parentContainerRef","paddingMode","uiShellResizableRefs","children","onClick","ref","banners","includes","fallback","sideNavBackgroundColor","isCollapsible","isCollapsed","startIcon","testId","variant","isLoading","_Skeleton","logoProps","rightSideMenu","topNavLeftSide","sideNavItems","appName","hasCustomFooter","sideNavFooter","footerComponent","footerItems","isObtrusive","tabIndex","MemoizedNarrowUiShellContent","displayName"],"sources":["../../../src/ui-shell/NarrowUiShellContent.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport styled from \"@emotion/styled\";\nimport { Skeleton } from \"@mui/material\";\nimport {\n CSSProperties,\n memo,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from \"react\";\nimport { ErrorBoundary } from \"react-error-boundary\";\n\nimport { Button } from \"../Buttons/Button.js\";\nimport type { HtmlProps } from \"../HtmlProps.js\";\nimport { CloseIcon } from \"../icons.generated/Close.js\";\nimport { MoreIcon } from \"../icons.generated/More.js\";\nimport { InnerAppContainer } from \"./InnerAppContainer.js\";\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"../OdysseyDesignTokensContext.js\";\nimport { SideNav } from \"./SideNav/SideNav.js\";\nimport { SideNavLogo } from \"./SideNav/SideNavLogo.js\";\nimport { HamburgerMenuIcon } from \"./TopNav/HamburgerMenuIcon.js\";\nimport { UiShellColors, useUiShellContext } from \"./UiShellProvider.js\";\nimport {\n UiShellNavComponentProps,\n UiShellContentProps,\n} from \"./uiShellContentTypes.js\";\nimport {\n emptySideNavItems,\n SIDE_NAV_WIDTH,\n TOP_NAV_HEIGHT,\n UI_SHELL_BASE_Z_INDEX,\n} from \"./uiShellSharedConstants.js\";\nimport { useScrollState } from \"./useScrollState.js\";\nimport { useMatchAppElementToUiShellAppArea } from \"./useMatchAppElementToUiShellAppArea.js\";\nimport { hexToRgb } from \"../hexToRgb.js\";\n\nconst StyledAppContentArea = styled(\"div\")({\n gridArea: \"app-content\",\n position: \"relative\",\n display: \"grid\",\n gridGap: 0,\n gridTemplateAreas: `\n \"left-side app-container right-side\"\n `,\n gridTemplateColumns: \"auto 1fr auto\",\n gridTemplateRows: \"1fr\",\n height: \"100%\",\n pointerEvents: \"none\",\n width: \"100%\",\n});\n\nconst StyledAppContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"appBackgroundColor\" && prop !== \"odysseyDesignTokens\",\n})<{\n appBackgroundColor?: UiShellColors[\"appBackgroundColor\"];\n}>(({ appBackgroundColor }) => ({\n backgroundColor: appBackgroundColor,\n height: \"100%\",\n gridArea: \"app-container\",\n overflow: \"hidden\",\n width: \"100%\",\n}));\n\nconst StyledBannersContainer = styled(\"div\")({\n gridArea: \"banners\",\n zIndex: UI_SHELL_BASE_Z_INDEX,\n});\n\nconst StyledLeftSideContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"isOpen\",\n})<{\n isOpen: boolean;\n}>(({ isOpen }) => ({\n display: isOpen ? \"block\" : \"none\",\n height: \"100%\",\n gridArea: \"left-side\",\n overflowY: \"auto\",\n position: \"absolute\",\n zIndex: UI_SHELL_BASE_Z_INDEX,\n}));\n\nconst StyledRightSideContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"isOpen\" && prop !== \"odysseyDesignTokens\",\n})<{\n isOpen: boolean;\n odysseyDesignTokens: DesignTokens;\n}>(({ isOpen, odysseyDesignTokens }) => ({\n backgroundColor: odysseyDesignTokens.HueNeutralWhite,\n display: isOpen ? \"block\" : \"none\",\n gridArea: \"right-side\",\n height: \"100%\",\n maxWidth: SIDE_NAV_WIDTH,\n overflowY: \"auto\",\n position: \"absolute\",\n right: 0,\n width: SIDE_NAV_WIDTH,\n zIndex: UI_SHELL_BASE_Z_INDEX,\n}));\n\nconst StyledMenuLogo = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{\n odysseyDesignTokens: DesignTokens;\n}>(({ odysseyDesignTokens }) => ({\n alignItems: \"center\",\n display: \"inline-flex\",\n gap: odysseyDesignTokens.Spacing3,\n}));\n\nconst StyledLogoContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{\n odysseyDesignTokens: DesignTokens;\n}>(({ odysseyDesignTokens }) => ({\n height: TOP_NAV_HEIGHT,\n paddingBlock: odysseyDesignTokens.Spacing4,\n\n \"svg, img\": {\n maxHeight: \"100%\",\n width: \"auto\",\n maxWidth: \"100%\",\n },\n}));\n\nconst StyledPageOverlay = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{\n odysseyDesignTokens: DesignTokens;\n}>(({ odysseyDesignTokens }) => ({\n backgroundColor: hexToRgb(\n odysseyDesignTokens.HueNeutral900,\n ).asFormattedString.replace(/rgb\\((.+)\\)$/, \"rgba($1, 0.26)\"),\n gridArea: \"app-content\",\n height: \"100vh\",\n left: 0,\n position: \"absolute\",\n top: 0,\n width: \"100vw\",\n zIndex: UI_SHELL_BASE_Z_INDEX,\n}));\n\nconst StyledSideNavContainer = styled(\"div\")({\n height: \"100%\", // Without this value, side nav won't fill up the height if the content is too short.\n});\n\nconst StyledUiShellContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{\n odysseyDesignTokens: DesignTokens;\n}>(({ odysseyDesignTokens }) => ({\n backgroundColor: odysseyDesignTokens.HueNeutral50,\n display: \"grid\",\n gridGap: 0,\n gridTemplateAreas: `\n \"banners\"\n \"top-nav\"\n \"app-content\"\n `,\n gridTemplateColumns: \"1fr\",\n gridTemplateRows: \"auto auto 1fr\",\n height: \"100vh\",\n overflow: \"hidden\",\n width: \"100vw\",\n}));\n\nconst StyledTopNav = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" &&\n prop !== \"isContentScrolled\" &&\n prop !== \"topNavBackgroundColor\",\n})<{\n isContentScrolled?: boolean;\n odysseyDesignTokens: DesignTokens;\n topNavBackgroundColor?: UiShellColors[\"topNavBackgroundColor\"];\n}>(({ odysseyDesignTokens, isContentScrolled, topNavBackgroundColor }) => ({\n alignItems: \"stretch\",\n backgroundColor: odysseyDesignTokens.HueNeutralWhite || topNavBackgroundColor, // This logic doesn't make sense, but I wanted to leave it here for when we eventually make a decision on `topNavBackgroundColor`. --Kevin Ghadyani\n boxShadow: isContentScrolled ? odysseyDesignTokens.DepthMedium : undefined,\n clipPath: \"inset(0 0 -100vh 0)\",\n display: \"flex\",\n flexDirection: \"column\",\n gridArea: \"top-nav\",\n height: \"100%\",\n justifyContent: \"center\",\n position: \"relative\",\n transition: `box-shadow ${odysseyDesignTokens.TransitionDurationMain} ${odysseyDesignTokens.TransitionTimingMain}`,\n zIndex: UI_SHELL_BASE_Z_INDEX,\n}));\n\nconst StyledTopNavMenu = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" && prop !== \"topNavBackgroundColor\",\n})<{\n odysseyDesignTokens: DesignTokens;\n topNavBackgroundColor?: UiShellColors[\"topNavBackgroundColor\"];\n}>(({ odysseyDesignTokens, topNavBackgroundColor }) => ({\n alignItems: \"center\",\n display: \"flex\",\n gap: odysseyDesignTokens.Spacing3,\n height: \"100%\",\n justifyContent: \"space-between\",\n maxHeight: TOP_NAV_HEIGHT,\n minHeight: TOP_NAV_HEIGHT,\n paddingBlock: odysseyDesignTokens.Spacing2,\n paddingInline: odysseyDesignTokens.Spacing3,\n transition: `box-shadow ${odysseyDesignTokens.TransitionDurationMain} ${odysseyDesignTokens.TransitionTimingMain}`,\n\n ...(topNavBackgroundColor === odysseyDesignTokens.HueNeutralWhite &&\n ({\n borderBottomColor: odysseyDesignTokens.HueNeutral100,\n borderBottomStyle: odysseyDesignTokens.BorderStyleMain,\n borderBottomWidth: odysseyDesignTokens.BorderWidthMain,\n } as CSSProperties)),\n}));\n\nconst StyledTopNavSearch = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{\n odysseyDesignTokens: DesignTokens;\n}>(({ odysseyDesignTokens }) => ({\n paddingBlock: odysseyDesignTokens.Spacing2,\n paddingInline: odysseyDesignTokens.Spacing3,\n}));\n\nexport type NarrowUiShellContentProps = Pick<HtmlProps, \"testId\"> &\n Pick<UiShellNavComponentProps, \"sideNavProps\" | \"topNavProps\"> &\n UiShellContentProps;\n\nconst NarrowUiShellContent = ({\n appElement,\n appElementScrollingMode,\n hasStandardAppContentPadding = true,\n initialVisibleSections = [\"TopNav\", \"SideNav\", \"AppSwitcher\"],\n onError = console.error,\n optionalComponents,\n sideNavProps,\n topNavProps,\n}: NarrowUiShellContentProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const uiShellContext = useUiShellContext();\n\n const { isContentScrolled } = useScrollState(appElement);\n\n const sideNavContainerRef = useRef<HTMLDivElement>(null);\n const topNavContainerRef = useRef<HTMLDivElement>(null);\n const uiShellAppAreaRef = useRef<HTMLDivElement>(null);\n\n const [isLeftSideMenuOpen, setIsLeftSideMenuOpen] = useState(false);\n const [isRightSideMenuOpen, setIsRightSideMenuOpen] = useState(false);\n\n const closeSideMenus = useCallback(() => {\n setIsLeftSideMenuOpen(false);\n setIsRightSideMenuOpen(false);\n }, []);\n\n useEffect(() => {\n const unsubscribeFromCloseRightSideMenu =\n uiShellContext?.subscribeToCloseRightSideMenu(() => {\n closeSideMenus();\n });\n\n const unsubscribeFromSideNavItemClicked =\n uiShellContext?.subscribeToCloseSideNavMenu(() => {\n closeSideMenus();\n });\n\n return () => {\n unsubscribeFromCloseRightSideMenu?.();\n unsubscribeFromSideNavItemClicked?.();\n };\n }, [closeSideMenus, uiShellContext]);\n\n const toggleLeftSideMenu = useCallback(() => {\n setIsRightSideMenuOpen(false);\n setIsLeftSideMenuOpen((isLeftSideMenuOpen) => !isLeftSideMenuOpen);\n }, []);\n\n const toggleRightSideMenu = useCallback(() => {\n setIsLeftSideMenuOpen(false);\n setIsRightSideMenuOpen((isRightSideMenuOpen) => !isRightSideMenuOpen);\n }, []);\n\n const { parentContainerRef } = useMatchAppElementToUiShellAppArea({\n appElement,\n appElementScrollingMode,\n paddingMode: hasStandardAppContentPadding ? \"compact\" : \"none\",\n uiShellAppAreaRef,\n uiShellResizableRefs: [\n sideNavContainerRef,\n topNavContainerRef,\n uiShellAppAreaRef,\n ],\n });\n\n return (\n <>\n {(isLeftSideMenuOpen || isRightSideMenuOpen) && (\n <StyledPageOverlay\n odysseyDesignTokens={odysseyDesignTokens}\n onClick={closeSideMenus}\n />\n )}\n\n <StyledUiShellContainer\n odysseyDesignTokens={odysseyDesignTokens}\n ref={parentContainerRef}\n >\n <StyledBannersContainer>\n {optionalComponents?.banners}\n </StyledBannersContainer>\n\n {(initialVisibleSections?.includes(\"TopNav\") || topNavProps) && (\n <ErrorBoundary fallback={null} onError={onError}>\n <StyledTopNav\n isContentScrolled={isContentScrolled}\n odysseyDesignTokens={odysseyDesignTokens}\n topNavBackgroundColor={uiShellContext?.topNavBackgroundColor}\n >\n <StyledTopNavMenu\n odysseyDesignTokens={odysseyDesignTokens}\n topNavBackgroundColor={uiShellContext?.sideNavBackgroundColor}\n >\n <StyledMenuLogo odysseyDesignTokens={odysseyDesignTokens}>\n {(sideNavProps?.isCollapsible ||\n !sideNavProps?.isCollapsed) && (\n <Button\n onClick={toggleLeftSideMenu}\n startIcon={<HamburgerMenuIcon />}\n testId=\"sidenav-menu--icon\"\n variant=\"floating\"\n />\n )}\n\n <StyledLogoContainer\n odysseyDesignTokens={odysseyDesignTokens}\n >\n {sideNavProps?.isLoading ? (\n // The skeleton takes the hardcoded dimensions of the Okta logo\n <Skeleton variant=\"rounded\" height={24} width={67} />\n ) : (\n <SideNavLogo {...sideNavProps?.logoProps} />\n )}\n </StyledLogoContainer>\n </StyledMenuLogo>\n\n {optionalComponents?.rightSideMenu && (\n <Button\n onClick={toggleRightSideMenu}\n startIcon={\n isRightSideMenuOpen ? <CloseIcon /> : <MoreIcon />\n }\n testId=\"userprofile-menu--icon\"\n variant=\"floating\"\n />\n )}\n </StyledTopNavMenu>\n\n {optionalComponents?.topNavLeftSide && (\n <StyledTopNavSearch odysseyDesignTokens={odysseyDesignTokens}>\n {optionalComponents?.topNavLeftSide}\n </StyledTopNavSearch>\n )}\n </StyledTopNav>\n </ErrorBoundary>\n )}\n\n <StyledAppContentArea>\n <StyledLeftSideContainer isOpen={isLeftSideMenuOpen}>\n {\n /* If SideNav should be initially visible and we have not yet received props, render SideNav with minimal inputs */\n initialVisibleSections?.includes(\"SideNav\") &&\n sideNavProps === undefined && (\n <ErrorBoundary fallback={null} onError={onError}>\n <SideNav isLoading sideNavItems={emptySideNavItems} />\n </ErrorBoundary>\n )\n }\n\n {sideNavProps && (\n <ErrorBoundary fallback={null} onError={onError}>\n <StyledSideNavContainer>\n <SideNav\n {...{\n ...{\n ...sideNavProps,\n // This hides the side nav logo or app name from showing up as we already have one in the narrow top nav.\n appName: undefined,\n logoProps: undefined,\n },\n ...(sideNavProps.hasCustomFooter &&\n optionalComponents?.sideNavFooter\n ? {\n footerComponent: optionalComponents.sideNavFooter,\n footerItems: undefined,\n hasCustomFooter: sideNavProps.hasCustomFooter,\n }\n : {\n footerItems: sideNavProps.footerItems,\n hasCustomFooter: false,\n }),\n }}\n isCollapsed={false}\n isCollapsible={false}\n isObtrusive\n />\n </StyledSideNavContainer>\n </ErrorBoundary>\n )}\n </StyledLeftSideContainer>\n\n <StyledRightSideContainer\n isOpen={isRightSideMenuOpen}\n odysseyDesignTokens={odysseyDesignTokens}\n >\n <StyledSideNavContainer>\n {optionalComponents?.rightSideMenu}\n </StyledSideNavContainer>\n </StyledRightSideContainer>\n\n <StyledAppContainer\n appBackgroundColor={uiShellContext?.appBackgroundColor}\n tabIndex={0}\n ref={uiShellAppAreaRef}\n >\n <InnerAppContainer isContentScrolled={isContentScrolled} />\n </StyledAppContainer>\n </StyledAppContentArea>\n </StyledUiShellContainer>\n </>\n );\n};\n\nconst MemoizedNarrowUiShellContent = memo(NarrowUiShellContent);\nMemoizedNarrowUiShellContent.displayName = \"NarrowUiShellContent\";\n\nexport { MemoizedNarrowUiShellContent as NarrowUiShellContent };\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,MAAM,MAAM,iBAAiB;AAEpC,SAEEC,IAAI,EACJC,WAAW,EACXC,SAAS,EACTC,MAAM,EACNC,QAAQ,QACH,OAAO;AACd,SAASC,aAAa,QAAQ,sBAAsB;AAEpD,SAASC,MAAM,QAAQ,sBAAsB;AAE7C,SAASC,SAAS,QAAQ,6BAA6B;AACvD,SAASC,QAAQ,QAAQ,4BAA4B;AACrD,SAASC,iBAAiB,QAAQ,wBAAwB;AAC1D,SAEEC,sBAAsB,QACjB,kCAAkC;AACzC,SAASC,OAAO,QAAQ,sBAAsB;AAC9C,SAASC,WAAW,QAAQ,0BAA0B;AACtD,SAASC,iBAAiB,QAAQ,+BAA+B;AACjE,SAAwBC,iBAAiB,QAAQ,sBAAsB;AAKvE,SACEC,iBAAiB,EACjBC,cAAc,EACdC,cAAc,EACdC,qBAAqB,QAChB,6BAA6B;AACpC,SAASC,cAAc,QAAQ,qBAAqB;AACpD,SAASC,kCAAkC,QAAQ,yCAAyC;AAC5F,SAASC,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EAAEyC,aAAa,GAC7B;kBACEC,eAAe,EAAE1C,kBAAkB,CAACyC,aAAa;kBACjDE,WAAW,EAAErE,SAAS;kBACtBkE,eAAe,EAAEvC,YAAY,CAACuC;gBAChC,CAAC,GACD;kBACEG,WAAW,EAAE1C,YAAY,CAAC0C,WAAW;kBACrCH,eAAe,EAAE;gBACnB,CAAC,CAAC;gBAERX,WAAW,EAAE,KAAM;gBACnBD,aAAa,EAAE,KAAM;gBACrBgB,WAAW;cAAA,CACZ;YAAC,CACoB;UAAC,CACZ,CAChB;QAAA,CACsB,CAAC,EAE1B5H,IAAA,CAAC2B,wBAAwB;UACvBF,MAAM,EAAEgE,mBAAoB;UAC5B7D,mBAAmB,EAAEA,mBAAoB;UAAAyE,QAAA,EAEzCrG,IAAA,CAAC8C,sBAAsB;YAAAuD,QAAA,EACpBrB,kBAAkB,EAAEoC;UAAa,CACZ;QAAC,CACD,CAAC,EAE3BpH,IAAA,CAACgB,kBAAkB;UACjBG,kBAAkB,EAAEgE,cAAc,EAAEhE,kBAAmB;UACvD0G,QAAQ,EAAE,CAAE;UACZtB,GAAG,EAAEjB,iBAAkB;UAAAe,QAAA,EAEvBrG,IAAA,CAACd,iBAAiB;YAACgE,iBAAiB,EAAEA;UAAkB,CAAE;QAAC,CACzC,CAAC;MAAA,CACD,CAAC;IAAA,CACD,CAAC;EAAA,CACzB,CAAC;AAEP,CAAC;AAED,MAAM4E,4BAA4B,GAAGrJ,IAAI,CAAC+F,oBAAoB,CAAC;AAC/DsD,4BAA4B,CAACC,WAAW,GAAG,sBAAsB;AAEjE,SAASD,4BAA4B,IAAItD,oBAAoB","ignoreList":[]}
1
+ {"version":3,"file":"NarrowUiShellContent.js","names":["styled","memo","useCallback","useEffect","useRef","useState","ErrorBoundary","Button","CloseIcon","MoreIcon","InnerAppContainer","useOdysseyDesignTokens","SideNav","SideNavLogo","HamburgerMenuIcon","useUiShellContext","emptySideNavItems","SIDE_NAV_WIDTH","TOP_NAV_HEIGHT","UI_SHELL_BASE_Z_INDEX","useScrollState","useMatchAppElementToUiShellAppArea","hexToRgb","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","StyledAppContentArea","gridArea","position","display","gridGap","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","height","width","StyledAppContainer","shouldForwardProp","prop","appBackgroundColor","backgroundColor","overflow","StyledBannersContainer","zIndex","StyledLeftSideContainer","isOpen","overflowY","StyledRightSideContainer","odysseyDesignTokens","HueNeutralWhite","maxWidth","right","StyledMenuLogo","alignItems","gap","Spacing3","StyledLogoContainer","paddingBlock","Spacing4","maxHeight","StyledPageOverlay","HueNeutral900","asFormattedString","replace","left","top","StyledSideNavContainer","StyledUiShellContainer","HueNeutral50","StyledTopNav","isContentScrolled","topNavBackgroundColor","boxShadow","DepthMedium","undefined","clipPath","flexDirection","justifyContent","transition","TransitionDurationMain","TransitionTimingMain","StyledTopNavMenu","minHeight","Spacing2","paddingInline","borderBottomColor","HueNeutral100","borderBottomStyle","BorderStyleMain","borderBottomWidth","BorderWidthMain","StyledTopNavSearch","NarrowUiShellContent","appElement","appElementScrollingMode","hasStandardAppContentPadding","initialVisibleSections","onError","console","error","optionalComponents","sideNavProps","topNavProps","uiShellContext","sideNavContainerRef","topNavContainerRef","uiShellAppAreaRef","isLeftSideMenuOpen","setIsLeftSideMenuOpen","isRightSideMenuOpen","setIsRightSideMenuOpen","closeSideMenus","unsubscribeFromCloseRightSideMenu","subscribeToCloseRightSideMenu","unsubscribeFromSideNavItemClicked","subscribeToCloseSideNavMenu","toggleLeftSideMenu","toggleRightSideMenu","parentContainerRef","paddingMode","uiShellResizableRefs","children","onClick","ref","banners","includes","fallback","sideNavBackgroundColor","isCollapsible","isCollapsed","startIcon","testId","variant","isLoading","_Skeleton","logoProps","rightSideMenu","topNavLeftSide","sideNavItems","appName","hasCustomFooter","sideNavFooter","footerComponent","footerItems","isObtrusive","tabIndex","MemoizedNarrowUiShellContent","displayName"],"sources":["../../../src/ui-shell/NarrowUiShellContent.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport styled from \"@emotion/styled\";\nimport { Skeleton } from \"@mui/material\";\nimport {\n CSSProperties,\n memo,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from \"react\";\nimport { ErrorBoundary } from \"react-error-boundary\";\n\nimport { Button } from \"../Buttons/Button.js\";\nimport type { HtmlProps } from \"../HtmlProps.js\";\nimport { CloseIcon } from \"../icons.generated/Close.js\";\nimport { MoreIcon } from \"../icons.generated/More.js\";\nimport { InnerAppContainer } from \"./InnerAppContainer.js\";\nimport {\n DesignTokens,\n useOdysseyDesignTokens,\n} from \"../OdysseyDesignTokensContext.js\";\nimport { SideNav } from \"./SideNav/SideNav.js\";\nimport { SideNavLogo } from \"./SideNav/SideNavLogo.js\";\nimport { HamburgerMenuIcon } from \"./TopNav/HamburgerMenuIcon.js\";\nimport { UiShellColors, useUiShellContext } from \"./UiShellProvider.js\";\nimport {\n UiShellNavComponentProps,\n UiShellContentProps,\n} from \"./uiShellContentTypes.js\";\nimport {\n emptySideNavItems,\n SIDE_NAV_WIDTH,\n TOP_NAV_HEIGHT,\n UI_SHELL_BASE_Z_INDEX,\n} from \"./uiShellSharedConstants.js\";\nimport { useScrollState } from \"./useScrollState.js\";\nimport { useMatchAppElementToUiShellAppArea } from \"./useMatchAppElementToUiShellAppArea.js\";\nimport { hexToRgb } from \"../hexToRgb.js\";\n\nconst StyledAppContentArea = styled(\"div\")({\n gridArea: \"app-content\",\n position: \"relative\",\n display: \"grid\",\n gridGap: 0,\n gridTemplateAreas: `\n \"left-side app-container right-side\"\n `,\n gridTemplateColumns: \"auto 1fr auto\",\n gridTemplateRows: \"1fr\",\n height: \"100%\",\n width: \"100%\",\n});\n\nconst StyledAppContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"appBackgroundColor\" && prop !== \"odysseyDesignTokens\",\n})<{\n appBackgroundColor?: UiShellColors[\"appBackgroundColor\"];\n}>(({ appBackgroundColor }) => ({\n backgroundColor: appBackgroundColor,\n gridArea: \"app-container\",\n height: \"100%\",\n overflow: \"hidden\",\n width: \"100%\",\n}));\n\nconst StyledBannersContainer = styled(\"div\")({\n gridArea: \"banners\",\n zIndex: UI_SHELL_BASE_Z_INDEX,\n});\n\nconst StyledLeftSideContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"isOpen\",\n})<{\n isOpen: boolean;\n}>(({ isOpen }) => ({\n display: isOpen ? \"block\" : \"none\",\n height: \"100%\",\n gridArea: \"left-side\",\n overflowY: \"auto\",\n position: \"absolute\",\n zIndex: UI_SHELL_BASE_Z_INDEX,\n}));\n\nconst StyledRightSideContainer = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"isOpen\" && prop !== \"odysseyDesignTokens\",\n})<{\n isOpen: boolean;\n odysseyDesignTokens: DesignTokens;\n}>(({ isOpen, odysseyDesignTokens }) => ({\n backgroundColor: odysseyDesignTokens.HueNeutralWhite,\n display: isOpen ? \"block\" : \"none\",\n gridArea: \"right-side\",\n height: \"100%\",\n maxWidth: SIDE_NAV_WIDTH,\n overflowY: \"auto\",\n position: \"absolute\",\n right: 0,\n width: SIDE_NAV_WIDTH,\n zIndex: UI_SHELL_BASE_Z_INDEX,\n}));\n\nconst StyledMenuLogo = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{\n odysseyDesignTokens: DesignTokens;\n}>(({ odysseyDesignTokens }) => ({\n alignItems: \"center\",\n display: \"inline-flex\",\n gap: odysseyDesignTokens.Spacing3,\n}));\n\nconst StyledLogoContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{\n odysseyDesignTokens: DesignTokens;\n}>(({ odysseyDesignTokens }) => ({\n height: TOP_NAV_HEIGHT,\n paddingBlock: odysseyDesignTokens.Spacing4,\n\n \"svg, img\": {\n maxHeight: \"100%\",\n width: \"auto\",\n maxWidth: \"100%\",\n },\n}));\n\nconst StyledPageOverlay = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{\n odysseyDesignTokens: DesignTokens;\n}>(({ odysseyDesignTokens }) => ({\n backgroundColor: hexToRgb(\n odysseyDesignTokens.HueNeutral900,\n ).asFormattedString.replace(/rgb\\((.+)\\)$/, \"rgba($1, 0.26)\"),\n gridArea: \"app-content\",\n height: \"100vh\",\n left: 0,\n position: \"absolute\",\n top: 0,\n width: \"100vw\",\n zIndex: UI_SHELL_BASE_Z_INDEX,\n}));\n\nconst StyledSideNavContainer = styled(\"div\")({\n height: \"100%\", // Without this value, side nav won't fill up the height if the content is too short.\n});\n\nconst StyledUiShellContainer = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{\n odysseyDesignTokens: DesignTokens;\n}>(({ odysseyDesignTokens }) => ({\n backgroundColor: odysseyDesignTokens.HueNeutral50,\n display: \"grid\",\n gridGap: 0,\n gridTemplateAreas: `\n \"banners\"\n \"top-nav\"\n \"app-content\"\n `,\n gridTemplateColumns: \"1fr\",\n gridTemplateRows: \"auto auto 1fr\",\n height: \"100vh\",\n overflow: \"hidden\",\n width: \"100vw\",\n}));\n\nconst StyledTopNav = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" &&\n prop !== \"isContentScrolled\" &&\n prop !== \"topNavBackgroundColor\",\n})<{\n isContentScrolled?: boolean;\n odysseyDesignTokens: DesignTokens;\n topNavBackgroundColor?: UiShellColors[\"topNavBackgroundColor\"];\n}>(({ odysseyDesignTokens, isContentScrolled, topNavBackgroundColor }) => ({\n alignItems: \"stretch\",\n backgroundColor: odysseyDesignTokens.HueNeutralWhite || topNavBackgroundColor, // This logic doesn't make sense, but I wanted to leave it here for when we eventually make a decision on `topNavBackgroundColor`. --Kevin Ghadyani\n boxShadow: isContentScrolled ? odysseyDesignTokens.DepthMedium : undefined,\n clipPath: \"inset(0 0 -100vh 0)\",\n display: \"flex\",\n flexDirection: \"column\",\n gridArea: \"top-nav\",\n height: \"100%\",\n justifyContent: \"center\",\n position: \"relative\",\n transition: `box-shadow ${odysseyDesignTokens.TransitionDurationMain} ${odysseyDesignTokens.TransitionTimingMain}`,\n zIndex: UI_SHELL_BASE_Z_INDEX,\n}));\n\nconst StyledTopNavMenu = styled(\"div\", {\n shouldForwardProp: (prop) =>\n prop !== \"odysseyDesignTokens\" && prop !== \"topNavBackgroundColor\",\n})<{\n odysseyDesignTokens: DesignTokens;\n topNavBackgroundColor?: UiShellColors[\"topNavBackgroundColor\"];\n}>(({ odysseyDesignTokens, topNavBackgroundColor }) => ({\n alignItems: \"center\",\n display: \"flex\",\n gap: odysseyDesignTokens.Spacing3,\n height: \"100%\",\n justifyContent: \"space-between\",\n maxHeight: TOP_NAV_HEIGHT,\n minHeight: TOP_NAV_HEIGHT,\n paddingBlock: odysseyDesignTokens.Spacing2,\n paddingInline: odysseyDesignTokens.Spacing3,\n transition: `box-shadow ${odysseyDesignTokens.TransitionDurationMain} ${odysseyDesignTokens.TransitionTimingMain}`,\n\n ...(topNavBackgroundColor === odysseyDesignTokens.HueNeutralWhite &&\n ({\n borderBottomColor: odysseyDesignTokens.HueNeutral100,\n borderBottomStyle: odysseyDesignTokens.BorderStyleMain,\n borderBottomWidth: odysseyDesignTokens.BorderWidthMain,\n } as CSSProperties)),\n}));\n\nconst StyledTopNavSearch = styled(\"div\", {\n shouldForwardProp: (prop) => prop !== \"odysseyDesignTokens\",\n})<{\n odysseyDesignTokens: DesignTokens;\n}>(({ odysseyDesignTokens }) => ({\n paddingBlock: odysseyDesignTokens.Spacing2,\n paddingInline: odysseyDesignTokens.Spacing3,\n}));\n\nexport type NarrowUiShellContentProps = Pick<HtmlProps, \"testId\"> &\n Pick<UiShellNavComponentProps, \"sideNavProps\" | \"topNavProps\"> &\n UiShellContentProps;\n\nconst NarrowUiShellContent = ({\n appElement,\n appElementScrollingMode,\n hasStandardAppContentPadding = true,\n initialVisibleSections = [\"TopNav\", \"SideNav\", \"AppSwitcher\"],\n onError = console.error,\n optionalComponents,\n sideNavProps,\n topNavProps,\n}: NarrowUiShellContentProps) => {\n const odysseyDesignTokens = useOdysseyDesignTokens();\n const uiShellContext = useUiShellContext();\n\n const { isContentScrolled } = useScrollState(appElement);\n\n const sideNavContainerRef = useRef<HTMLDivElement>(null);\n const topNavContainerRef = useRef<HTMLDivElement>(null);\n const uiShellAppAreaRef = useRef<HTMLDivElement>(null);\n\n const [isLeftSideMenuOpen, setIsLeftSideMenuOpen] = useState(false);\n const [isRightSideMenuOpen, setIsRightSideMenuOpen] = useState(false);\n\n const closeSideMenus = useCallback(() => {\n setIsLeftSideMenuOpen(false);\n setIsRightSideMenuOpen(false);\n }, []);\n\n useEffect(() => {\n const unsubscribeFromCloseRightSideMenu =\n uiShellContext?.subscribeToCloseRightSideMenu(() => {\n closeSideMenus();\n });\n\n const unsubscribeFromSideNavItemClicked =\n uiShellContext?.subscribeToCloseSideNavMenu(() => {\n closeSideMenus();\n });\n\n return () => {\n unsubscribeFromCloseRightSideMenu?.();\n unsubscribeFromSideNavItemClicked?.();\n };\n }, [closeSideMenus, uiShellContext]);\n\n const toggleLeftSideMenu = useCallback(() => {\n setIsRightSideMenuOpen(false);\n setIsLeftSideMenuOpen((isLeftSideMenuOpen) => !isLeftSideMenuOpen);\n }, []);\n\n const toggleRightSideMenu = useCallback(() => {\n setIsLeftSideMenuOpen(false);\n setIsRightSideMenuOpen((isRightSideMenuOpen) => !isRightSideMenuOpen);\n }, []);\n\n const { parentContainerRef } = useMatchAppElementToUiShellAppArea({\n appElement,\n appElementScrollingMode,\n paddingMode: hasStandardAppContentPadding ? \"compact\" : \"none\",\n uiShellAppAreaRef,\n uiShellResizableRefs: [\n sideNavContainerRef,\n topNavContainerRef,\n uiShellAppAreaRef,\n ],\n });\n\n return (\n <>\n {(isLeftSideMenuOpen || isRightSideMenuOpen) && (\n <StyledPageOverlay\n odysseyDesignTokens={odysseyDesignTokens}\n onClick={closeSideMenus}\n />\n )}\n\n <StyledUiShellContainer\n odysseyDesignTokens={odysseyDesignTokens}\n ref={parentContainerRef}\n >\n <StyledBannersContainer>\n {optionalComponents?.banners}\n </StyledBannersContainer>\n\n {(initialVisibleSections?.includes(\"TopNav\") || topNavProps) && (\n <ErrorBoundary fallback={null} onError={onError}>\n <StyledTopNav\n isContentScrolled={isContentScrolled}\n odysseyDesignTokens={odysseyDesignTokens}\n topNavBackgroundColor={uiShellContext?.topNavBackgroundColor}\n >\n <StyledTopNavMenu\n odysseyDesignTokens={odysseyDesignTokens}\n topNavBackgroundColor={uiShellContext?.sideNavBackgroundColor}\n >\n <StyledMenuLogo odysseyDesignTokens={odysseyDesignTokens}>\n {(sideNavProps?.isCollapsible ||\n !sideNavProps?.isCollapsed) && (\n <Button\n onClick={toggleLeftSideMenu}\n startIcon={<HamburgerMenuIcon />}\n testId=\"sidenav-menu--icon\"\n variant=\"floating\"\n />\n )}\n\n <StyledLogoContainer\n odysseyDesignTokens={odysseyDesignTokens}\n >\n {sideNavProps?.isLoading ? (\n // The skeleton takes the hardcoded dimensions of the Okta logo\n <Skeleton variant=\"rounded\" height={24} width={67} />\n ) : (\n <SideNavLogo {...sideNavProps?.logoProps} />\n )}\n </StyledLogoContainer>\n </StyledMenuLogo>\n\n {optionalComponents?.rightSideMenu && (\n <Button\n onClick={toggleRightSideMenu}\n startIcon={\n isRightSideMenuOpen ? <CloseIcon /> : <MoreIcon />\n }\n testId=\"userprofile-menu--icon\"\n variant=\"floating\"\n />\n )}\n </StyledTopNavMenu>\n\n {optionalComponents?.topNavLeftSide && (\n <StyledTopNavSearch odysseyDesignTokens={odysseyDesignTokens}>\n {optionalComponents?.topNavLeftSide}\n </StyledTopNavSearch>\n )}\n </StyledTopNav>\n </ErrorBoundary>\n )}\n\n <StyledAppContentArea>\n <StyledLeftSideContainer isOpen={isLeftSideMenuOpen}>\n {\n /* If SideNav should be initially visible and we have not yet received props, render SideNav with minimal inputs */\n initialVisibleSections?.includes(\"SideNav\") &&\n sideNavProps === undefined && (\n <ErrorBoundary fallback={null} onError={onError}>\n <SideNav isLoading sideNavItems={emptySideNavItems} />\n </ErrorBoundary>\n )\n }\n\n {sideNavProps && (\n <ErrorBoundary fallback={null} onError={onError}>\n <StyledSideNavContainer>\n <SideNav\n {...{\n ...{\n ...sideNavProps,\n // This hides the side nav logo or app name from showing up as we already have one in the narrow top nav.\n appName: undefined,\n logoProps: undefined,\n },\n ...(sideNavProps.hasCustomFooter &&\n optionalComponents?.sideNavFooter\n ? {\n footerComponent: optionalComponents.sideNavFooter,\n footerItems: undefined,\n hasCustomFooter: sideNavProps.hasCustomFooter,\n }\n : {\n footerItems: sideNavProps.footerItems,\n hasCustomFooter: false,\n }),\n }}\n isCollapsed={false}\n isCollapsible={false}\n isObtrusive\n />\n </StyledSideNavContainer>\n </ErrorBoundary>\n )}\n </StyledLeftSideContainer>\n\n <StyledRightSideContainer\n isOpen={isRightSideMenuOpen}\n odysseyDesignTokens={odysseyDesignTokens}\n >\n <StyledSideNavContainer>\n {optionalComponents?.rightSideMenu}\n </StyledSideNavContainer>\n </StyledRightSideContainer>\n\n <StyledAppContainer\n appBackgroundColor={uiShellContext?.appBackgroundColor}\n tabIndex={0}\n ref={uiShellAppAreaRef}\n >\n <InnerAppContainer isContentScrolled={isContentScrolled} />\n </StyledAppContainer>\n </StyledAppContentArea>\n </StyledUiShellContainer>\n </>\n );\n};\n\nconst MemoizedNarrowUiShellContent = memo(NarrowUiShellContent);\nMemoizedNarrowUiShellContent.displayName = \"NarrowUiShellContent\";\n\nexport { Memo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