{"version":3,"file":"Tooltip.cjs","names":["_react","require","_MuiPropsChild","_jsxRuntime","_interopRequireDefault","e","__esModule","default","Tooltip","ariaType","children","placement","testId","text","translate","jsx","_Tooltip2","describeChild","title","MuiPropsChild","MemoizedTooltip","exports","memo","displayName"],"sources":["../../src/Tooltip.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 type { TooltipProps as MuiTooltipProps } from \"@mui/material\";\n\nimport { Tooltip as MuiTooltip } from \"@mui/material\";\nimport { memo, ReactElement } from \"react\";\n\nimport { HtmlProps } from \"./HtmlProps.js\";\nimport { MuiPropsChild } from \"./MuiPropsChild.js\";\n\nexport type TooltipProps = {\n  /**\n   * The type of ARIA attribute to use\n   */\n  ariaType: \"description\" | \"label\";\n  /**\n   * The content that triggers the Tooltip when hovered\n   */\n  children: ReactElement;\n  /**\n   * The placement of the Tooltip\n   * @default \"top\"\n   */\n  placement?: MuiTooltipProps[\"placement\"];\n  /**\n   * The text to display in the Tooltip\n   */\n  text: string;\n} & Pick<HtmlProps, \"testId\" | \"translate\">;\n\n/**\n * A contextual popup that displays a short text label when the user hovers over or focuses its trigger element. Use to surface supplementary information for UI elements where visible label space is limited.\n */\nconst Tooltip = ({\n  ariaType,\n  children,\n  placement = \"top\",\n  testId,\n  text,\n  translate,\n}: TooltipProps) => (\n  <MuiTooltip\n    data-se={testId}\n    describeChild={ariaType === \"description\"}\n    placement={placement}\n    title={text}\n    translate={translate}\n  >\n    <MuiPropsChild>{children}</MuiPropsChild>\n  </MuiTooltip>\n);\n\nconst MemoizedTooltip = memo(Tooltip);\nMemoizedTooltip.displayName = \"Tooltip\";\n\nexport { MemoizedTooltip as Tooltip };\n"],"mappings":";;;;;;;AAeA,IAAAA,MAAA,GAAAC,OAAA;AAGA,IAAAC,cAAA,GAAAD,OAAA;AAAmD,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAG,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAlBnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAiCA,MAAMG,OAAO,GAAGA,CAAC;EACfC,QAAQ;EACRC,QAAQ;EACRC,SAAS,GAAG,KAAK;EACjBC,MAAM;EACNC,IAAI;EACJC;AACY,CAAC,KACb,IAAAX,WAAA,CAAAY,GAAA,EAAAC,SAAA,CAAAT,OAAA;EACE,WAASK,MAAO;EAChBK,aAAa,EAAER,QAAQ,KAAK,aAAc;EAC1CE,SAAS,EAAEA,SAAU;EACrBO,KAAK,EAAEL,IAAK;EACZC,SAAS,EAAEA,SAAU;EAAAJ,QAAA,EAErB,IAAAP,WAAA,CAAAY,GAAA,EAACb,cAAA,CAAAiB,aAAa;IAAAT,QAAA,EAAEA;EAAQ,CAAgB;AAAC,CAC/B,CACb;AAED,MAAMU,eAAe,GAAAC,OAAA,CAAAb,OAAA,GAAG,IAAAc,WAAI,EAACd,OAAO,CAAC;AACrCY,eAAe,CAACG,WAAW,yCAAY","ignoreList":[]}