{"version":3,"file":"ScreenReaderText.cjs","names":["_utils","require","_react","_jsxRuntime","_interopRequireDefault","e","__esModule","default","style","visuallyHidden","ScreenReaderText","ariaHidden","children","id","translate","jsx","_Box2","component","sx","MemoizedScreenReaderText","exports","memo","displayName"],"sources":["../../src/ScreenReaderText.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 { Box } from \"@mui/material\";\nimport { visuallyHidden } from \"@mui/utils\";\nimport { memo, ReactNode } from \"react\";\n\nimport { HtmlProps } from \"./HtmlProps.js\";\n\nexport type ScreenReaderTextProps = {\n  /**\n   * The visually-hidden text.\n   */\n  children: ReactNode;\n  /**\n   * HTML `id` attribute for referencing this element from other elements (e.g., `aria-labelledby`).\n   */\n  id?: string;\n} & Pick<HtmlProps, \"ariaHidden\" | \"translate\">;\n\n/**\n * MUI sx expects you pass in a CSS object, not an object with CSS.\n * They seem identical, but only if you create a new object like this will MUI be happy with the type of visuallyHidden. It's otherwise a regular object with CSS properties.\n */\nconst style = { ...visuallyHidden };\n\n/**\n * Renders text that is visually hidden but announced by screen readers. Use to provide accessible labels or context without affecting the visible layout.\n */\nconst ScreenReaderText = ({\n  ariaHidden,\n  children,\n  id,\n  translate,\n}: ScreenReaderTextProps) => (\n  <Box\n    aria-hidden={ariaHidden}\n    component=\"span\"\n    id={id}\n    sx={style}\n    translate={translate}\n  >\n    {children}\n  </Box>\n);\n\nconst MemoizedScreenReaderText = memo(ScreenReaderText);\nMemoizedScreenReaderText.displayName = \"ScreenReaderText\";\n\nexport { MemoizedScreenReaderText as ScreenReaderText };\n"],"mappings":";;;;;;;AAaA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAAwC,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAG,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAdxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAuBA,MAAMG,KAAK,GAAG;EAAE,GAAGC;AAAe,CAAC;AAKnC,MAAMC,gBAAgB,GAAGA,CAAC;EACxBC,UAAU;EACVC,QAAQ;EACRC,EAAE;EACFC;AACqB,CAAC,KACtB,IAAAX,WAAA,CAAAY,GAAA,EAAAC,KAAA,CAAAT,OAAA;EACE,eAAaI,UAAW;EACxBM,SAAS,EAAC,MAAM;EAChBJ,EAAE,EAAEA,EAAG;EACPK,EAAE,EAAEV,KAAM;EACVM,SAAS,EAAEA,SAAU;EAAAF,QAAA,EAEpBA;AAAQ,CACN,CACN;AAED,MAAMO,wBAAwB,GAAAC,OAAA,CAAAV,gBAAA,GAAG,IAAAW,WAAI,EAACX,gBAAgB,CAAC;AACvDS,wBAAwB,CAACG,WAAW,kDAAqB","ignoreList":[]}