{"version":3,"file":"Radio.cjs","names":["_FormControlLabel","require","_jsxRuntime","radioComponents","odysseyTokens","MuiRadio","defaultProps","size","icon","jsx","Fragment","checkedIcon","styleOverrides","root","ownerState","theme","isReadOnly","inputProps","readOnly","position","insetBlockStart","typography","fontSize","width","TypographyLineHeightUi","minWidth","height","borderRadius","borderWidth","BorderWidthMain","borderStyle","BorderStyleMain","borderColor","HueNeutral500","padding","boxShadow","transition","transitions","create","duration","TransitionDurationMain","content","Spacing2","backgroundColor","formControlLabelClasses","HueNeutral900","BorderColorDangerDark","PaletteDangerDark","BorderColorDangerControl","HueNeutralWhite","PaletteDangerMain","PalettePrimaryMain","outline","outlineOffset","HueNeutral50","BorderColorDisabled","HueNeutral100","HueNeutral300","cursor","HueNeutral700","exports"],"sources":["../../../../src/theme/components/Radio.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 { formControlLabelClasses } from \"@mui/material/FormControlLabel\";\n\nimport type { GetComponentsProps } from \"./types.js\";\n\nexport const radioComponents = ({\n  odysseyTokens,\n}: GetComponentsProps): Pick<\n  NonNullable<ThemeOptions[\"components\"]>,\n  \"MuiRadio\"\n> => ({\n  MuiRadio: {\n    defaultProps: {\n      size: \"small\",\n      icon: <></>,\n      checkedIcon: <></>,\n    },\n    styleOverrides: {\n      root: ({ ownerState, theme }) => {\n        const isReadOnly = ownerState?.inputProps?.readOnly;\n\n        return {\n          position: \"relative\",\n          insetBlockStart: `${2 / theme.typography.fontSize}rem`,\n          width: `${odysseyTokens.TypographyLineHeightUi}em`,\n          minWidth: `${odysseyTokens.TypographyLineHeightUi}em`,\n          height: `${odysseyTokens.TypographyLineHeightUi}em`,\n          borderRadius: `${odysseyTokens.TypographyLineHeightUi}em`,\n          borderWidth: odysseyTokens.BorderWidthMain,\n          borderStyle: odysseyTokens.BorderStyleMain,\n          borderColor: odysseyTokens.HueNeutral500,\n          padding: 0,\n          boxShadow: `0 0 0 0 transparent`,\n          transition: theme.transitions.create(\n            [\"border-color\", \"background-color\", \"box-shadow\"],\n            {\n              duration: odysseyTokens.TransitionDurationMain,\n            },\n          ),\n          \"&::before\": {\n            content: \"''\",\n            position: \"absolute\",\n            width: odysseyTokens.Spacing2,\n            height: odysseyTokens.Spacing2,\n            borderRadius: \"50%\",\n            backgroundColor: \"transparent\",\n            transition: theme.transitions.create([\"background-color\"], {\n              duration: odysseyTokens.TransitionDurationMain,\n            }),\n          },\n          [`.${formControlLabelClasses.root}:hover > &`]: {\n            backgroundColor: \"transparent\",\n            borderColor: odysseyTokens.HueNeutral900,\n          },\n          \".Mui-error:hover > &\": {\n            backgroundColor: \"transparent\",\n            borderColor: odysseyTokens.BorderColorDangerDark,\n            \"&::before\": {\n              backgroundColor: odysseyTokens.PaletteDangerDark,\n            },\n          },\n          \".Mui-error > &\": {\n            borderColor: odysseyTokens.BorderColorDangerControl,\n            \"&.Mui-focusVisible\": {\n              boxShadow: `0 0 0 2px ${odysseyTokens.HueNeutralWhite}, 0 0 0 4px ${odysseyTokens.PaletteDangerMain}`,\n            },\n          },\n          \"&.Mui-focusVisible\": {\n            borderColor: odysseyTokens.HueNeutral900,\n            boxShadow: `0 0 0 2px ${odysseyTokens.HueNeutralWhite}, 0 0 0 4px ${odysseyTokens.PalettePrimaryMain}`,\n            outline: \"2px solid transparent\",\n            outlineOffset: \"1px\",\n          },\n          \"&.Mui-checked\": {\n            position: \"relative\",\n            \"&::before\": {\n              backgroundColor: odysseyTokens.PalettePrimaryMain,\n            },\n          },\n          \".Mui-error > &.Mui-checked::before\": {\n            backgroundColor: odysseyTokens.PaletteDangerMain,\n          },\n          \"&.Mui-disabled\": {\n            backgroundColor: odysseyTokens.HueNeutral50,\n            borderColor: odysseyTokens.BorderColorDisabled,\n            \"&.Mui-checked::before\": {\n              backgroundColor: odysseyTokens.BorderColorDisabled,\n            },\n          },\n          ...(isReadOnly && {\n            backgroundColor: odysseyTokens.HueNeutral100,\n            borderColor: odysseyTokens.HueNeutral300,\n            cursor: \"default\",\n            \"&::before\": {\n              content: \"''\",\n              position: \"absolute\",\n              width: odysseyTokens.Spacing2,\n              height: odysseyTokens.Spacing2,\n              borderRadius: \"50%\",\n              backgroundColor: \"transparent\",\n              transition: theme.transitions.create([\"background-color\"], {\n                duration: odysseyTokens.TransitionDurationMain,\n              }),\n            },\n            \"&.Mui-checked::before\": {\n              backgroundColor: odysseyTokens.HueNeutral700,\n            },\n            [`.${formControlLabelClasses.root}:hover > &`]: {\n              backgroundColor: odysseyTokens.HueNeutral100,\n              borderColor: odysseyTokens.HueNeutral300,\n            },\n          }),\n        };\n      },\n    },\n  },\n});\n"],"mappings":";;;;;;AAcA,IAAAA,iBAAA,GAAAC,OAAA;AAAyE,IAAAC,WAAA,GAAAD,OAAA;AAdzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQO,MAAME,eAAe,GAAGA,CAAC;EAC9BC;AACkB,CAAC,MAGf;EACJC,QAAQ,EAAE;IACRC,YAAY,EAAE;MACZC,IAAI,EAAE,OAAO;MACbC,IAAI,EAAE,IAAAN,WAAA,CAAAO,GAAA,EAAAP,WAAA,CAAAQ,QAAA,IAAI,CAAC;MACXC,WAAW,EAAE,IAAAT,WAAA,CAAAO,GAAA,EAAAP,WAAA,CAAAQ,QAAA,IAAI;IACnB,CAAC;IACDE,cAAc,EAAE;MACdC,IAAI,EAAEA,CAAC;QAAEC,UAAU;QAAEC;MAAM,CAAC,KAAK;QAC/B,MAAMC,UAAU,GAAGF,UAAU,EA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