@pedidopago/ui 1.10.25 → 1.10.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CarouselContext=void 0,exports.CarouselProvider=CarouselProvider;var _react=require("react"),_interval=require("src/shared/hooks/interval"),_useDebounce=require("src/shared/hooks/useDebounce"),_jsxRuntime=require("react/jsx-runtime");function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(o,minLen){if(o){if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);return"Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n?Array.from(o):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(o,minLen):void 0}}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _iterableToArrayLimit(arr,i){var _i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null!=_i){var _s,_e,_x,_r,_arr=[],_n=!0,_d=!1;try{if(_x=(_i=_i.call(arr)).next,0===i){if(Object(_i)!==_i)return;_n=!1}else for(;!(_n=(_s=_x.call(_i)).done)&&(_arr.push(_s.value),_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{if(!_n&&null!=_i.return&&(_r=_i.return(),Object(_r)!==_r))return}finally{if(_d)throw _e}}return _arr}}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}var CarouselContext=/*#__PURE__*/(0,_react.createContext)({});exports.CarouselContext=CarouselContext;function CarouselProvider(_ref){function getSliderInfo(){var container=sliderRef.current;if(!container)throw new Error("Not found Slider Container Ref");var arrayOfChildrens=Array.from(container.childNodes),positions=arrayOfChildrens.map(function(data,index){return{offsetPosition:data.offsetLeft,position:index+1}});return{container:container,positions:positions}}function navigateToScroll(scrollPosition){var sliderInfo=getSliderInfo();sliderInfo.container&&sliderInfo.container.scrollTo({behavior:"smooth",left:scrollPosition})}function hideRightButton(hide){rightButtonRef.current&&(hide?rightButtonRef.current.classList.add("hide"):rightButtonRef.current.classList.remove("hide"))}function hideLeftButton(hide){leftButtonRef.current&&(hide?leftButtonRef.current.classList.add("hide"):leftButtonRef.current.classList.remove("hide"))}function handleHideButtons(){var sliderInfo=getSliderInfo();if(sliderInfo.container){var maxScroll=sliderInfo.container.scrollWidth-sliderInfo.container.clientWidth,isEndOfScroll=sliderInfo.container.scrollLeft>=maxScroll;isMaxScroll.current=isEndOfScroll,hideRightButton(currentActive===sliderInfo.positions.length),hideLeftButton(0===sliderInfo.container.scrollLeft)}}function beginMomentumTracking(){cancelMomentumTracking(),momentumID=requestAnimationFrame(momentumLoop),delayAutoExec&&setDelay(delayAutoExec)}function cancelMomentumTracking(){cancelAnimationFrame(momentumID)}function onMomentumEnd(){handleHideButtons()}function momentumLoop(){var sliderInfo=getSliderInfo();if(sliderInfo.container){var _sliderInfo$container;sliderInfo.container.scrollLeft+=2*velX,velX*=.95;var disableMomentum=isMaxScroll.current||0===(null===(_sliderInfo$container=sliderInfo.container)||void 0===_sliderInfo$container?void 0:_sliderInfo$container.scrollLeft);.75<Math.abs(velX)&&!disableMomentum?(hideLeftButton(!0),hideRightButton(!0),momentumID=requestAnimationFrame(momentumLoop)):onMomentumEnd()}}function scrollByIndex(index){var _getSliderInfo$positi,position=null===(_getSliderInfo$positi=getSliderInfo().positions.find(function(data){return data.position===index}))||void 0===_getSliderInfo$positi?void 0:_getSliderInfo$positi.offsetPosition;if(void 0===position)throw new Error("Notfound index to Scroll");navigateToScroll(position)}function changeCurrent(index){var sliderInfo=getSliderInfo();0>=index||index>sliderInfo.positions.length||scrollByIndex(index)}var momentumID,children=_ref.children,delayAutoExec=_ref.delayAutoExec,isDragging=(0,_react.useRef)(!1),startX=(0,_react.useRef)(0),initialScrollLeft=(0,_react.useRef)(0),velX=0,sliderRef=(0,_react.useRef)(null),_useState=(0,_react.useState)(1),_useState2=_slicedToArray(_useState,2),currentActive=_useState2[0],setCurrentActive=_useState2[1],_useState3=(0,_react.useState)(!1),_useState4=_slicedToArray(_useState3,2),itemsHasNoOverflow=_useState4[0],setItemsHasNoOverflow=_useState4[1],_useState5=(0,_react.useState)(delayAutoExec),_useState6=_slicedToArray(_useState5,2),delay=_useState6[0],setDelay=_useState6[1],rightButtonRef=(0,_react.useRef)(null),leftButtonRef=(0,_react.useRef)(null),isMaxScroll=(0,_react.useRef)(!1),activeControlByScroll=(0,_useDebounce.useDebounce)(function(){var sliderInfo=getSliderInfo(),active=sliderInfo.positions.reverse().findIndex(function(position){return position.offsetPosition<=sliderInfo.container.scrollLeft+20});// need to add a offset to scrollLeft because the scrollLeft
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CarouselContext=void 0,exports.CarouselProvider=CarouselProvider;var _react=require("react"),_interval=require("../../../../shared/hooks/interval"),_useDebounce=require("../../../../shared/hooks/useDebounce"),_jsxRuntime=require("react/jsx-runtime");function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(o,minLen){if(o){if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);return"Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n?Array.from(o):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(o,minLen):void 0}}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _iterableToArrayLimit(arr,i){var _i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null!=_i){var _s,_e,_x,_r,_arr=[],_n=!0,_d=!1;try{if(_x=(_i=_i.call(arr)).next,0===i){if(Object(_i)!==_i)return;_n=!1}else for(;!(_n=(_s=_x.call(_i)).done)&&(_arr.push(_s.value),_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{if(!_n&&null!=_i.return&&(_r=_i.return(),Object(_r)!==_r))return}finally{if(_d)throw _e}}return _arr}}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}var CarouselContext=/*#__PURE__*/(0,_react.createContext)({});exports.CarouselContext=CarouselContext;function CarouselProvider(_ref){function getSliderInfo(){var container=sliderRef.current;if(!container)throw new Error("Not found Slider Container Ref");var arrayOfChildrens=Array.from(container.childNodes),positions=arrayOfChildrens.map(function(data,index){return{offsetPosition:data.offsetLeft,position:index+1}});return{container:container,positions:positions}}function navigateToScroll(scrollPosition){var sliderInfo=getSliderInfo();sliderInfo.container&&sliderInfo.container.scrollTo({behavior:"smooth",left:scrollPosition})}function hideRightButton(hide){rightButtonRef.current&&(hide?rightButtonRef.current.classList.add("hide"):rightButtonRef.current.classList.remove("hide"))}function hideLeftButton(hide){leftButtonRef.current&&(hide?leftButtonRef.current.classList.add("hide"):leftButtonRef.current.classList.remove("hide"))}function handleHideButtons(){var sliderInfo=getSliderInfo();if(sliderInfo.container){var maxScroll=sliderInfo.container.scrollWidth-sliderInfo.container.clientWidth,isEndOfScroll=sliderInfo.container.scrollLeft>=maxScroll;isMaxScroll.current=isEndOfScroll,hideRightButton(currentActive===sliderInfo.positions.length),hideLeftButton(0===sliderInfo.container.scrollLeft)}}function beginMomentumTracking(){cancelMomentumTracking(),momentumID=requestAnimationFrame(momentumLoop),delayAutoExec&&setDelay(delayAutoExec)}function cancelMomentumTracking(){cancelAnimationFrame(momentumID)}function onMomentumEnd(){handleHideButtons()}function momentumLoop(){var sliderInfo=getSliderInfo();if(sliderInfo.container){var _sliderInfo$container;sliderInfo.container.scrollLeft+=2*velX,velX*=.95;var disableMomentum=isMaxScroll.current||0===(null===(_sliderInfo$container=sliderInfo.container)||void 0===_sliderInfo$container?void 0:_sliderInfo$container.scrollLeft);.75<Math.abs(velX)&&!disableMomentum?(hideLeftButton(!0),hideRightButton(!0),momentumID=requestAnimationFrame(momentumLoop)):onMomentumEnd()}}function scrollByIndex(index){var _getSliderInfo$positi,position=null===(_getSliderInfo$positi=getSliderInfo().positions.find(function(data){return data.position===index}))||void 0===_getSliderInfo$positi?void 0:_getSliderInfo$positi.offsetPosition;if(void 0===position)throw new Error("Notfound index to Scroll");navigateToScroll(position)}function changeCurrent(index){var sliderInfo=getSliderInfo();0>=index||index>sliderInfo.positions.length||scrollByIndex(index)}var momentumID,children=_ref.children,delayAutoExec=_ref.delayAutoExec,isDragging=(0,_react.useRef)(!1),startX=(0,_react.useRef)(0),initialScrollLeft=(0,_react.useRef)(0),velX=0,sliderRef=(0,_react.useRef)(null),_useState=(0,_react.useState)(1),_useState2=_slicedToArray(_useState,2),currentActive=_useState2[0],setCurrentActive=_useState2[1],_useState3=(0,_react.useState)(!1),_useState4=_slicedToArray(_useState3,2),itemsHasNoOverflow=_useState4[0],setItemsHasNoOverflow=_useState4[1],_useState5=(0,_react.useState)(delayAutoExec),_useState6=_slicedToArray(_useState5,2),delay=_useState6[0],setDelay=_useState6[1],rightButtonRef=(0,_react.useRef)(null),leftButtonRef=(0,_react.useRef)(null),isMaxScroll=(0,_react.useRef)(!1),activeControlByScroll=(0,_useDebounce.useDebounce)(function(){var sliderInfo=getSliderInfo(),active=sliderInfo.positions.reverse().findIndex(function(position){return position.offsetPosition<=sliderInfo.container.scrollLeft+20});// need to add a offset to scrollLeft because the scrollLeft
2
2
  // is a little bit less than the offset position in some cases
3
3
  setCurrentActive(sliderInfo.positions.length-active)},100);return(0,_interval.useInterval)(function(){var sliderInfo=getSliderInfo();return currentActive===sliderInfo.positions.length?void changeCurrent(1):void changeCurrent(currentActive+1)},delay),/*#__PURE__*/(0,_jsxRuntime.jsx)(CarouselContext.Provider,{value:{currentActive:currentActive,leftButtonRef:leftButtonRef,rightButtonRef:rightButtonRef,itemsHasNoOverflow:itemsHasNoOverflow,sliderRef:sliderRef,changeCurrent:changeCurrent,handleScroll:function(event){var _document$activeEleme,_document$activeEleme2,element=event.currentTarget,maxScroll=element.scrollWidth-element.clientWidth,isEndOfScroll=element.scrollLeft>=maxScroll;isMaxScroll.current=!1;var isActiveLeftButton=leftButtonRef.current!==(null===(_document$activeEleme=document.activeElement)||void 0===_document$activeEleme?void 0:_document$activeEleme.parentElement),isActiveRightButton=rightButtonRef.current!==(null===(_document$activeEleme2=document.activeElement)||void 0===_document$activeEleme2?void 0:_document$activeEleme2.parentElement);setItemsHasNoOverflow(!!isEndOfScroll),activeControlByScroll(),isEndOfScroll?(isMaxScroll.current=!0,setTimeout(function(){return hideRightButton(isActiveRightButton)},1e3)):setTimeout(function(){return hideRightButton(!1)},1e3),0===element.scrollLeft?hideLeftButton(isActiveLeftButton):hideLeftButton(!1)},handleMouseUp:function(event){var sliderInfo=getSliderInfo();isDragging.current=!1;var targets=event.currentTarget.childNodes;if(targets.forEach(function(item){item.style.pointerEvents="auto"}),sliderInfo.container){hideLeftButton(!1),beginMomentumTracking(),hideRightButton(isMaxScroll.current);var isStartOfScroll=0===sliderInfo.container.scrollLeft;hideLeftButton(isStartOfScroll)}},handleEnter:function(){setDelay(0)},handleMouseMove:function(e){var sliderInfo=getSliderInfo();if(isDragging.current){e.preventDefault();var targets=e.currentTarget.childNodes;if(targets.forEach(function(item){item.style.pointerEvents="none"}),sliderInfo.container){hideRightButton(!0),hideLeftButton(!0);var x=e.pageX-sliderInfo.container.offsetLeft,walk=x-startX.current,prevScrollLeft=sliderInfo.container.scrollLeft;sliderInfo.container.scrollLeft=initialScrollLeft.current-walk,velX=sliderInfo.container.scrollLeft-prevScrollLeft}}},handleWheel:function(){cancelMomentumTracking()},handleMouseDown:function(event){var sliderInfo=getSliderInfo();isDragging.current=!0,sliderInfo.container&&(startX.current=event.pageX-sliderInfo.container.offsetLeft,initialScrollLeft.current=sliderInfo.container.scrollLeft,cancelMomentumTracking())},moveCarousel:function(direction){var sliderInfo=getSliderInfo();if(sliderInfo.container){var nextPosition=currentActive+1;switch(hideRightButton(!1),hideLeftButton(!1),direction){case"left":changeCurrent(currentActive-1||1);break;case"right":changeCurrent(nextPosition),nextPosition===sliderInfo.positions.length&&hideRightButton(!0);break;default:throw new Error("Invalid direction");}}},handleMouseLeave:function(){isDragging.current=!1,setDelay(delayAutoExec),handleHideButtons()},beginMomentumTracking:beginMomentumTracking,hideLeftButton:hideLeftButton,hideRightButton:hideRightButton},children:children})}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.HelperTextContainer=exports.HelperText=exports.Container=void 0;var _templateObject,_templateObject2,_templateObject3,_react=require("@emotion/react"),_styled=_interopRequireDefault(require("@emotion/styled"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var Container=_styled.default.div(function(_ref){var direction=_ref.direction;return(0,_react.css)(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n display: flex;\n flex-direction: ",";\n align-items: flex-st;\n gap: 0.5rem;\n "])),direction)});exports.Container=Container;var HelperTextContainer=_styled.default.div(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n\n margin-top: 0.5rem;\n"])));exports.HelperTextContainer=HelperTextContainer;var HelperText=_styled.default.span(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n font-size: ",";\n\n color: ",";\n padding: 0 20px;\n"])),function(props){return props.theme.fontSizes.xxs},function(props){return props.alert&&"success"!==props.alert?props.theme.colors[props.alert].default:props.theme.colors.neutral.neutral4});exports.HelperText=HelperText;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.HelperTextContainer=exports.HelperText=exports.Container=void 0;var _templateObject,_templateObject2,_templateObject3,_react=require("@emotion/react"),_styled=_interopRequireDefault(require("@emotion/styled"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var Container=_styled.default.div(function(_ref){var direction=_ref.direction;return(0,_react.css)(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n display: flex;\n flex-direction: ",";\n align-items: flex-start;\n gap: 0.5rem;\n "])),direction)});exports.Container=Container;var HelperTextContainer=_styled.default.div(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n\n margin-top: 0.5rem;\n"])));exports.HelperTextContainer=HelperTextContainer;var HelperText=_styled.default.span(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n font-size: ",";\n\n color: ",";\n padding: 0 20px;\n"])),function(props){return props.theme.fontSizes.xxs},function(props){return props.alert&&"success"!==props.alert?props.theme.colors[props.alert].default:props.theme.colors.neutral.neutral4});exports.HelperText=HelperText;
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  interface ReactPortalProps {
3
- wrapperId: string;
3
+ wrapperId?: string;
4
4
  children: ReactNode | ReactNode[] | JSX.Element | JSX.Element[];
5
5
  }
6
6
  export declare function ReactPortal({ children, wrapperId }: ReactPortalProps): import("react").ReactPortal | null;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ReactPortal/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAuB,MAAM,OAAO,CAAC;AAIvD,UAAU,gBAAgB;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,SAAS,GAAG,SAAS,EAAE,GAAG,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;CACjE;AAED,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,SAAyB,EAAE,EAAE,gBAAgB,sCAsBpF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ReactPortal/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAuB,MAAM,OAAO,CAAC;AAIvD,UAAU,gBAAgB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,SAAS,GAAG,SAAS,EAAE,GAAG,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;CACjE;AAED,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,SAAyB,EAAE,EAAE,gBAAgB,sCAsBpF"}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ReactPortal=ReactPortal;var _react=require("react"),_reactDom=require("react-dom"),_createWrapperAndApprendToBody=require("./utils/createWrapperAndApprendToBody"),_jsxRuntime=require("react/jsx-runtime");function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(o,minLen){if(o){if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);return"Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n?Array.from(o):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(o,minLen):void 0}}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _iterableToArrayLimit(arr,i){var _i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null!=_i){var _s,_e,_x,_r,_arr=[],_n=!0,_d=!1;try{if(_x=(_i=_i.call(arr)).next,0===i){if(Object(_i)!==_i)return;_n=!1}else for(;!(_n=(_s=_x.call(_i)).done)&&(_arr.push(_s.value),_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{if(!_n&&null!=_i.return&&(_r=_i.return(),Object(_r)!==_r))return}finally{if(_d)throw _e}}return _arr}}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}function ReactPortal(_ref){var children=_ref.children,_ref$wrapperId=_ref.wrapperId,wrapperId=void 0===_ref$wrapperId?"portal-root":_ref$wrapperId,_useState=(0,_react.useState)(null),_useState2=_slicedToArray(_useState,2),wrapperElement=_useState2[0],setWrapperElement=_useState2[1];return(0,_react.useEffect)(function(){var element=document.getElementById(wrapperId),systemCreated=!1;return element||(systemCreated=!0,element=(0,_createWrapperAndApprendToBody.createWrapperAndAppendToBody)(wrapperId)),setWrapperElement(element),function(){systemCreated&&element.parentNode&&element.parentNode.removeChild(element)}},[wrapperId]),null===wrapperElement?null:/*#__PURE__*/(0,_reactDom.createPortal)(/*#__PURE__*/(0,_jsxRuntime.jsx)(_jsxRuntime.Fragment,{children:children}),wrapperElement)}
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ReactPortal=ReactPortal;var _react=require("react"),_reactDom=require("react-dom"),_createWrapperAndApprendToBody=require("./utils/createWrapperAndApprendToBody"),_jsxRuntime=require("react/jsx-runtime");function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(o,minLen){if(o){if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);return"Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n?Array.from(o):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(o,minLen):void 0}}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _iterableToArrayLimit(arr,i){var _i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null!=_i){var _s,_e,_x,_r,_arr=[],_n=!0,_d=!1;try{if(_x=(_i=_i.call(arr)).next,0===i){if(Object(_i)!==_i)return;_n=!1}else for(;!(_n=(_s=_x.call(_i)).done)&&(_arr.push(_s.value),_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{if(!_n&&null!=_i.return&&(_r=_i.return(),Object(_r)!==_r))return}finally{if(_d)throw _e}}return _arr}}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}function ReactPortal(_ref){var children=_ref.children,_ref$wrapperId=_ref.wrapperId,wrapperId=void 0===_ref$wrapperId?"portal-root":_ref$wrapperId,_useState=(0,_react.useState)(null),_useState2=_slicedToArray(_useState,2),wrapperElement=_useState2[0],setWrapperElement=_useState2[1];return(0,_react.useEffect)(function(){var root=document.getElementById(wrapperId),systemCreated=!1;return root||(systemCreated=!0,root=(0,_createWrapperAndApprendToBody.createWrapperAndAppendToBody)(wrapperId)),setWrapperElement(root),function(){systemCreated&&0===root.childNodes.length&&root.remove()}},[wrapperId]),null===wrapperElement?null:/*#__PURE__*/(0,_reactDom.createPortal)(/*#__PURE__*/(0,_jsxRuntime.jsx)(_jsxRuntime.Fragment,{children:children}),wrapperElement)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pedidopago/ui",
3
- "version": "1.10.25",
3
+ "version": "1.10.27",
4
4
  "description": "Quick build beatiful Pedido Pago apps",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",