{"version":3,"file":"Drawer.cjs","names":["_useMediaQuery","require","drawerSizes","persistent","temporary","drawerComponents","odysseyTokens","MuiDrawer","styleOverrides","root","paper","ownerState","width","variant","display","overflowY","flexDirection","flexWrap","justifyContent","alignItems","alignContent","color","HueNeutral700","position","borderRadius","BorderRadiusOuter","border","boxShadow","ShadowScale1","toCompactMediaQuery","exports"],"sources":["../../../../src/theme/components/Drawer.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2026-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 { ThemeOptions } from \"@mui/material\";\n\nimport type { GetComponentsProps } from \"./types.js\";\n\nimport { toCompactMediaQuery } from \"../useMediaQuery.js\";\n\nconst drawerSizes = {\n  persistent: \"25.714rem\", //~360px\n  temporary: \"28.571rem\", //~400px\n};\n\nexport const drawerComponents = ({\n  odysseyTokens,\n}: GetComponentsProps): Pick<\n  NonNullable<ThemeOptions[\"components\"]>,\n  \"MuiDrawer\"\n> => ({\n  MuiDrawer: {\n    styleOverrides: {\n      root: {},\n      paper: ({ ownerState }) => ({\n        width:\n          ownerState.variant === \"temporary\"\n            ? drawerSizes.temporary\n            : drawerSizes.persistent, //Temporary = overlay drawer, Persistent = inline drawer\n        display: \"flex\",\n        overflowY: \"auto\",\n        flexDirection: \"column\",\n        flexWrap: \"nowrap\",\n        justifyContent: \"space-between\",\n        alignItems: \"stretch\",\n        alignContent: \"flex-end\",\n        color: odysseyTokens.HueNeutral700,\n        ...(ownerState.variant === \"persistent\" && {\n          position: \"static\",\n          borderRadius: odysseyTokens.BorderRadiusOuter,\n          border: \"0\",\n        }),\n        ...(ownerState.variant === \"temporary\" && {\n          boxShadow: odysseyTokens.ShadowScale1,\n          // A fixed-width overlay wider than the viewport clips its content and makes the page scroll horizontally at the WCAG 1.4.10 reflow floor. Not 100vw: that counts the scrollbar gutter and keeps the horizontal scrollbar.\n          [toCompactMediaQuery(\"width\")]: {\n            width: \"100%\",\n          },\n        }),\n      }),\n    },\n  },\n});\n"],"mappings":";;;;;;AAgBA,IAAAA,cAAA,GAAAC,OAAA;AAhBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA,MAAMC,WAAW,GAAG;EAClBC,UAAU,EAAE,WAAW;EACvBC,SAAS,EAAE;AACb,CAAC;AAEM,MAAMC,gBAAgB,GAAGA,CAAC;EAC/BC;AACkB,CAAC,MAGf;EACJC,SAAS,EAAE;IACTC,cAAc,EAAE;MACdC,IAAI,EAAE,CAAC,CAAC;MACRC,KAAK,EAAEA,CAAC;QAAEC;MAAW,CAAC,MAAM;QAC1BC,KAAK,EACHD,UAAU,CAACE,OAAO,KAAK,WAAW,GAC9BX,WAAW,CAACE,SAAS,GACrBF,WAAW,CAACC,UAAU;QAC5BW,OAAO,EAAE,MAAM;QACfC,SAAS,EAAE,MAAM;QACjBC,aAAa,EAAE,QAAQ;QACvBC,QAAQ,EAAE,QAAQ;QAClBC,cAAc,EAAE,eAAe;QAC/BC,UAAU,EAAE,SAAS;QACrBC,YAAY,EAAE,UAAU;QACxBC,KAAK,EAAEf,aAAa,CAACgB,aAAa;QAClC,IAAIX,UAAU,CAACE,OAAO,KAAK,YAAY,IAAI;UACzCU,QAAQ,EAAE,QAAQ;UAClBC,YAAY,EAAElB,aAAa,CAACmB,iBAAiB;UAC7CC,MAAM,EAAE;QACV,CAAC,CAAC;QACF,IAAIf,UAAU,CAACE,OAAO,KAAK,WAAW,IAAI;UACxCc,SAAS,EAAErB,aAAa,CAACsB,YAAY;UAErC,CAAC,IAAAC,kCAAmB,EAAC,OAAO,CAAC,GAAG;YAC9BjB,KAAK,EAAE;UACT;QACF,CAAC;MACH,CAAC;IACH;EACF;AACF,CAAC,CAAC;AAACkB,OAAA,CAAAzB,gBAAA,GAAAA,gBAAA","ignoreList":[]}