69617314bc72dd2da6bd0234eaf654fa.json 2.9 KB
{"ast":null,"code":"var _interopRequireDefault=require(\"@babel/runtime/helpers/interopRequireDefault\");Object.defineProperty(exports,\"__esModule\",{value:true});exports.default=normalizeValueWithProperty;var _unitlessNumbers=_interopRequireDefault(require(\"../../modules/unitlessNumbers\"));var _normalizeColor=_interopRequireDefault(require(\"../../modules/normalizeColor\"));var colorProps={backgroundColor:true,borderColor:true,borderTopColor:true,borderRightColor:true,borderBottomColor:true,borderLeftColor:true,color:true,shadowColor:true,textDecorationColor:true,textShadowColor:true};function normalizeValueWithProperty(value,property){var returnValue=value;if((property==null||!_unitlessNumbers.default[property])&&typeof value==='number'){returnValue=value+\"px\";}else if(property!=null&&colorProps[property]){returnValue=(0,_normalizeColor.default)(value);}return returnValue;}","map":{"version":3,"sources":["C:/Users/bluej/Desktop/2_2/searchGuide/searchGuide/node_modules/react-native-web/dist/exports/StyleSheet/normalizeValueWithProperty.js"],"names":["colorProps","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","color","shadowColor","textDecorationColor","textShadowColor","normalizeValueWithProperty","value","property","returnValue","unitlessNumbers"],"mappings":"uLAQA,sFACA,oFACA,GAAIA,CAAAA,UAAU,CAAG,CACfC,eAAe,CAAE,IADF,CAEfC,WAAW,CAAE,IAFE,CAGfC,cAAc,CAAE,IAHD,CAIfC,gBAAgB,CAAE,IAJH,CAKfC,iBAAiB,CAAE,IALJ,CAMfC,eAAe,CAAE,IANF,CAOfC,KAAK,CAAE,IAPQ,CAQfC,WAAW,CAAE,IARE,CASfC,mBAAmB,CAAE,IATN,CAUfC,eAAe,CAAE,IAVF,CAAjB,CAYe,QAASC,CAAAA,0BAAT,CAAoCC,KAApC,CAA2CC,QAA3C,CAAqD,CAClE,GAAIC,CAAAA,WAAW,CAAGF,KAAlB,CAEA,GAAI,CAACC,QAAQ,EAAI,IAAZ,EAAoB,CAACE,yBAAgBF,QAAhB,CAAtB,GAAoD,MAAOD,CAAAA,KAAP,GAAiB,QAAzE,CAAmF,CACjFE,WAAW,CAAGF,KAAK,CAAG,IAAtB,CACD,CAFD,IAEO,IAAIC,QAAQ,EAAI,IAAZ,EAAoBb,UAAU,CAACa,QAAD,CAAlC,CAA8C,CACnDC,WAAW,CAAG,4BAAeF,KAAf,CAAd,CACD,CAED,MAAOE,CAAAA,WAAP,CACD","sourcesContent":["/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport unitlessNumbers from '../../modules/unitlessNumbers';\nimport normalizeColor from '../../modules/normalizeColor';\nvar colorProps = {\n  backgroundColor: true,\n  borderColor: true,\n  borderTopColor: true,\n  borderRightColor: true,\n  borderBottomColor: true,\n  borderLeftColor: true,\n  color: true,\n  shadowColor: true,\n  textDecorationColor: true,\n  textShadowColor: true\n};\nexport default function normalizeValueWithProperty(value, property) {\n  var returnValue = value;\n\n  if ((property == null || !unitlessNumbers[property]) && typeof value === 'number') {\n    returnValue = value + \"px\";\n  } else if (property != null && colorProps[property]) {\n    returnValue = normalizeColor(value);\n  }\n\n  return returnValue;\n}"]},"metadata":{},"sourceType":"script"}