{"ast":null,"code":"'use client';\n\nimport _slicedToArray from \"C:/Users/user/Desktop/08portreact/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";\nimport _objectSpread from \"C:/Users/user/Desktop/08portreact/node_modules/@babel/runtime/helpers/esm/objectSpread2.js\";\nimport _objectWithoutProperties from \"C:/Users/user/Desktop/08portreact/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\";\nvar _excluded = [\"rest\"],\n  _excluded2 = [\"children\", \"className\", \"size\", \"variant\", \"color\", \"highContrast\"];\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Text } from './text';\nimport { calloutRootPropDefs } from './callout.props';\nimport { extractMarginProps, withMarginProps, withBreakpoints } from '../helpers';\nvar CalloutContext = React.createContext({});\nvar CalloutRoot = React.forwardRef(function (props, forwardedRef) {\n  var _extractMarginProps = extractMarginProps(props),\n    marginRest = _extractMarginProps.rest,\n    marginProps = _objectWithoutProperties(_extractMarginProps, _excluded);\n  var children = marginRest.children,\n    className = marginRest.className,\n    _marginRest$size = marginRest.size,\n    size = _marginRest$size === void 0 ? calloutRootPropDefs.size.default : _marginRest$size,\n    _marginRest$variant = marginRest.variant,\n    variant = _marginRest$variant === void 0 ? calloutRootPropDefs.variant.default : _marginRest$variant,\n    _marginRest$color = marginRest.color,\n    color = _marginRest$color === void 0 ? calloutRootPropDefs.color.default : _marginRest$color,\n    _marginRest$highContr = marginRest.highContrast,\n    highContrast = _marginRest$highContr === void 0 ? calloutRootPropDefs.highContrast.default : _marginRest$highContr,\n    rootProps = _objectWithoutProperties(marginRest, _excluded2);\n  return React.createElement(\"div\", _objectSpread(_objectSpread({\n    \"data-accent-color\": color\n  }, rootProps), {}, {\n    className: classNames('rt-CalloutRoot', className, withBreakpoints(size, 'rt-r-size'), \"rt-variant-\".concat(variant), {\n      'rt-high-contrast': highContrast\n    }, withMarginProps(marginProps)),\n    ref: forwardedRef\n  }), React.createElement(CalloutContext.Provider, {\n    value: React.useMemo(function () {\n      return {\n        size: size,\n        color: color,\n        highContrast: highContrast\n      };\n    }, [size, color, highContrast])\n  }, children));\n});\nCalloutRoot.displayName = 'CalloutRoot';\nvar CalloutIcon = React.forwardRef(function (props, forwardedRef) {\n  var _React$useContext = React.useContext(CalloutContext),\n    color = _React$useContext.color,\n    size = _React$useContext.size,\n    highContrast = _React$useContext.highContrast;\n  return React.createElement(Text, {\n    asChild: true,\n    color: color,\n    size: getTextSize(size),\n    highContrast: highContrast\n  }, React.createElement(\"div\", _objectSpread(_objectSpread({}, props), {}, {\n    className: classNames('rt-CalloutIcon', props.className),\n    ref: forwardedRef\n  })));\n});\nCalloutIcon.displayName = 'CalloutIcon';\nvar CalloutText = React.forwardRef(function (props, forwardedRef) {\n  var _React$useContext2 = React.useContext(CalloutContext),\n    color = _React$useContext2.color,\n    size = _React$useContext2.size,\n    highContrast = _React$useContext2.highContrast;\n  return React.createElement(Text, _objectSpread(_objectSpread({\n    as: \"p\",\n    size: getTextSize(size),\n    color: color,\n    highContrast: highContrast\n  }, props), {}, {\n    ref: forwardedRef,\n    className: classNames('rt-CalloutText', props.className)\n  }));\n});\nCalloutText.displayName = 'CalloutText';\nfunction getTextSize(size) {\n  if (size === undefined) return undefined;\n  if (typeof size === 'string') {\n    return getNonResponsiveTextSize(size);\n  }\n  return Object.fromEntries(Object.entries(size).map(function (_ref) {\n    var _ref2 = _slicedToArray(_ref, 2),\n      key = _ref2[0],\n      value = _ref2[1];\n    return [key, getNonResponsiveTextSize(value)];\n  }));\n}\nfunction getNonResponsiveTextSize(size) {\n  return size === '3' ? '3' : '2';\n}\nvar Callout = Object.assign({}, {\n  Root: CalloutRoot,\n  Icon: CalloutIcon,\n  Text: CalloutText\n});\nexport { Callout, CalloutRoot, CalloutIcon, CalloutText };","map":{"version":3,"names":["_slicedToArray","_objectSpread","_objectWithoutProperties","_excluded","_excluded2","React","classNames","Text","calloutRootPropDefs","extractMarginProps","withMarginProps","withBreakpoints","CalloutContext","createContext","CalloutRoot","forwardRef","props","forwardedRef","_extractMarginProps","marginRest","rest","marginProps","children","className","_marginRest$size","size","default","_marginRest$variant","variant","_marginRest$color","color","_marginRest$highContr","highContrast","rootProps","createElement","concat","ref","Provider","value","useMemo","displayName","CalloutIcon","_React$useContext","useContext","asChild","getTextSize","CalloutText","_React$useContext2","as","undefined","getNonResponsiveTextSize","Object","fromEntries","entries","map","_ref","_ref2","key","Callout","assign","Root","Icon"],"sources":["../../../src/components/callout.tsx"],"sourcesContent":[null],"mappings":"AAAA,YAAY;;AAAC,OAAAA,cAAA;AAAA,OAAAC,aAAA;AAAA,OAAAC,wBAAA;AAAA,IAAAC,SAAA;EAAAC,UAAA;AAEb,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,OAAOC,UAAU,MAAM,YAAY;AACnC,SAASC,IAAI,QAAQ,QAAQ;AAE7B,SAASC,mBAAmB,QAAQ,iBAAiB;AACrD,SAASC,kBAAkB,EAAEC,eAAe,EAAEC,eAAe,QAAQ,YAAY;AAOjF,IAAMC,cAAc,GAAGP,KAAK,CAACQ,aAAa,CAAsB,EAAE,CAAC;AAOnE,IAAMC,WAAW,GAAGT,KAAK,CAACU,UAAU,CAClC,UAACC,KAAK,EAAEC,YAAY,EAAI;EACtB,IAAAC,mBAAA,GAA6CT,kBAAkB,CAACO,KAAK,CAAC;IAAxDG,UAAU,GAAAD,mBAAA,CAAhBE,IAAI;IAAiBC,WAAW,GAAAnB,wBAAA,CAAAgB,mBAAA,EAAAf,SAAA;EACxC,IACEmB,QAAQ,GAONH,UAAU,CAPZG,QAAQ;IACRC,SAAS,GAMPJ,UAAU,CANZI,SAAS;IAAAC,gBAAA,GAMPL,UAAU,CALZM,IAAI;IAAJA,IAAI,GAAAD,gBAAA,cAAGhB,mBAAmB,CAACiB,IAAI,CAACC,OAAO,GAAAF,gBAAA;IAAAG,mBAAA,GAKrCR,UAAU,CAJZS,OAAO;IAAPA,OAAO,GAAAD,mBAAA,cAAGnB,mBAAmB,CAACoB,OAAO,CAACF,OAAO,GAAAC,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