{"version":3,"file":"remUtils.cjs","names":["stripRem","remValue","Number","replace","exports","toRem","pixelValue","fromRem"],"sources":["../../src/remUtils.ts"],"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\n/**\n * takes a rem value as an argument like \"2rem\" and strips the \"rem\" text and returns just the number\n */\nexport const stripRem = (remValue: string) =>\n  Number(remValue.replace(/rem$/, \"\"));\n\n/**\n * takes a pixel value as an argument and converts that to rem value based on a 14px font size\n */\nexport const toRem = (pixelValue: number) => pixelValue / 14;\n\n/**\n * takes a rem value based on a 14px font size as an argument and returns a pixel value\n */\nexport const fromRem = (remValue: number) => remValue * 14;\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAKO,MAAMA,QAAQ,GAAIC,QAAgB,IACvCC,MAAM,CAACD,QAAQ,CAACE,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AAACC,OAAA,CAAAJ,QAAA,GAAAA,QAAA;AAKhC,MAAMK,KAAK,GAAIC,UAAkB,IAAKA,UAAU,GAAG,EAAE;AAACF,OAAA,CAAAC,KAAA,GAAAA,KAAA;AAKtD,MAAME,OAAO,GAAIN,QAAgB,IAAKA,QAAQ,GAAG,EAAE;AAACG,OAAA,CAAAG,OAAA,GAAAA,OAAA","ignoreList":[]}