@pedidopago/ui 1.12.18 → 1.12.19

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 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CarouselExample=CarouselExample,exports.CarouselExampleControls=CarouselExampleControls,exports.CarouselExampleCustomButtons=CarouselExampleCustomButtons,exports.CarouselExampleDynamicChids=CarouselExampleDynamicChids;var _index=require("../index"),_Button=_interopRequireDefault(require("../../Button")),_Flex=_interopRequireDefault(require("../../Flex")),_styles=require("./styles"),_jsxRuntime=require("react/jsx-runtime");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _typeof(obj){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var source,i=1;i<arguments.length;i++)source=null==arguments[i]?{}:arguments[i],i%2?ownKeys(Object(source),!0).forEach(function(key){_defineProperty(target,key,source[key])}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))});return target}function _defineProperty(obj,key,value){return key=_toPropertyKey(key),key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return"symbol"===_typeof(key)?key:key+""}function _toPrimitive(input,hint){if("object"!==_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(prim!==void 0){var res=prim.call(input,hint||"default");if("object"!==_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}/* eslint-disable no-console */var arrayTeste=["1","2","3","4","5","6","7","8","9","10","11","12"];function CarouselExample(props){return/*#__PURE__*/(0,_jsxRuntime.jsxs)(_Flex.default,{direction:"column",spacing:"1rem",alignItems:"flex-start",style:{maxWidth:"100%",height:"80vh"},children:[/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.Carousel,_objectSpread(_objectSpread({},props),{},{children:/*#__PURE__*/(0,_jsxRuntime.jsxs)(_styles.CarouselContainerExample,{children:[/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.CarouselSlideItem,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselItemExample,{style:{height:"100px",width:"250px"},children:"1"})}),/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.CarouselSlideItem,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselItemExample,{style:{height:"100px",width:"150px"},children:"2"})}),/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.CarouselSlideItem,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselItemExample,{style:{height:"100px",width:"50px"},children:"3"})}),/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.CarouselSlideItem,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselItemExample,{style:{height:"100px",width:"350px"},children:"4"})}),/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.CarouselSlideItem,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselItemExample,{style:{height:"100px",width:"350px"},children:"5"})}),/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.CarouselSlideItem,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselItemExample,{style:{height:"100px",width:"250px"},children:"6"})}),/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.CarouselSlideItem,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselItemExample,{style:{height:"100px",width:"150px"},children:"7"})}),/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.CarouselSlideItem,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselItemExample,{style:{height:"100px",width:"450px"},children:"8"})})]})})),/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.Carousel,_objectSpread(_objectSpread({},props),{},{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselContainerExample,{children:arrayTeste.map(function(item,index){return/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.CarouselSlideItem,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselItemExample,{onClick:function onClick(){console.log(item)},style:{height:"100px",width:"800px"},children:item})},"".concat(index,"-item-big"))})})})),/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.Carousel,_objectSpread(_objectSpread({},props),{},{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselContainerExample,{children:arrayTeste.map(function(item,index){return/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.CarouselSlideItem,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselItemExample,{style:{height:"100px",width:"300px"},children:item})},"".concat(index,"-item-large"))})})})),/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.Carousel,_objectSpread(_objectSpread({},props),{},{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselContainerExample,{children:arrayTeste.map(function(item,index){return/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.CarouselSlideItem,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselItemExample,{style:{height:"100px",width:"150px"},children:item})},"".concat(index,"-item-middle"))})})})),/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.Carousel,_objectSpread(_objectSpread({},props),{},{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselContainerExample,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.CarouselSlideItem,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselItemExample,{style:{height:"100px",width:"150px"},children:"S\xF3 um"})})})}))]})}function CarouselExampleDynamicChids(){return/*#__PURE__*/(0,_jsxRuntime.jsx)(_Flex.default,{style:{height:"500px"},children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.Carousel,{children:/*#__PURE__*/(0,_jsxRuntime.jsxs)(_styles.CarouselContainerExample,{children:[/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.CarouselSlideItem,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselItemExample,{style:{height:"100px",width:"250px"},children:"1"})}),/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.CarouselSlideItem,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselItemExample,{style:{height:"100px",width:"150px"},children:"2"})}),/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.CarouselSlideItem,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselItemExample,{style:{height:"100px",width:"50px"},children:"3"})}),/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.CarouselSlideItem,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselItemExample,{style:{height:"100px",width:"350px"},children:"4"})}),/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.CarouselSlideItem,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselItemExample,{style:{height:"100px",width:"350px"},children:"5"})}),/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.CarouselSlideItem,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselItemExample,{style:{height:"100px",width:"250px"},children:"6"})}),/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.CarouselSlideItem,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselItemExample,{style:{height:"100px",width:"150px"},children:"7"})}),/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.CarouselSlideItem,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselItemExample,{style:{height:"100px",width:"450px"},children:"8"})})]})})})}function CarouselExampleCustomButtons(){return/*#__PURE__*/(0,_jsxRuntime.jsx)(_Flex.default,{style:{height:"500px"},children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.Carousel,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselContainerExample,{leftButton:function leftButton(moveLeft){return/*#__PURE__*/(0,_jsxRuntime.jsx)(_Button.default,{onClick:function onClick(){moveLeft()},children:"Voltar"})},rightButton:function rightButton(moveRight){return/*#__PURE__*/(0,_jsxRuntime.jsx)(_Button.default,{style:{whiteSpace:"nowrap"},onClick:function onClick(){moveRight()},children:"Avan\xE7ar"})},children:arrayTeste.map(function(item,index){return/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.CarouselSlideItem,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselItemExample,{style:{height:"100%",width:"800px"},children:item})},"".concat(index,"-item-custom-button"))})})})})}function CarouselExampleControls(){return/*#__PURE__*/(0,_jsxRuntime.jsx)(_Flex.default,{style:{height:"500px"},children:/*#__PURE__*/(0,_jsxRuntime.jsxs)(_index.Carousel,{style:{position:"relative"},children:[/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselContainerExample,{leftButton:function leftButton(moveLeft){return/*#__PURE__*/(0,_jsxRuntime.jsx)(_Button.default,{onClick:function onClick(){moveLeft()},children:"Voltar"})},rightButton:function rightButton(moveRight){return/*#__PURE__*/(0,_jsxRuntime.jsx)(_Button.default,{style:{whiteSpace:"nowrap"},onClick:function onClick(){moveRight()},children:"Avan\xE7ar"})},children:arrayTeste.map(function(item,index){return/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.CarouselSlideItem,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselItemExample,{style:{height:"100%",width:"100%"},children:item})},"".concat(index,"-item-custom-button"))})}),/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.ControlContainer,{children:arrayTeste.map(function(_,index){return/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.ControlItem,{position:index+1},"".concat(index,"-item-control-button"))})})]})})}
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CarouselExample=CarouselExample,exports.CarouselExampleControls=CarouselExampleControls,exports.CarouselExampleCustomButtons=CarouselExampleCustomButtons,exports.CarouselExampleDynamicChids=CarouselExampleDynamicChids;var _index=require("../index"),_Button=_interopRequireDefault(require("../../Button")),_Flex=_interopRequireDefault(require("../../Flex")),_styles=require("./styles"),_jsxRuntime=require("react/jsx-runtime");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _typeof(obj){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var source,i=1;i<arguments.length;i++)source=null==arguments[i]?{}:arguments[i],i%2?ownKeys(Object(source),!0).forEach(function(key){_defineProperty(target,key,source[key])}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))});return target}function _defineProperty(obj,key,value){return key=_toPropertyKey(key),key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return"symbol"===_typeof(key)?key:key+""}function _toPrimitive(input,hint){if("object"!==_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(prim!==void 0){var res=prim.call(input,hint||"default");if("object"!==_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}/* eslint-disable no-console */var arrayTeste=["1","2","3","4","5","6","7","8","9","10","11","12"];function CarouselExample(props){return/*#__PURE__*/(0,_jsxRuntime.jsxs)(_Flex.default,{direction:"column",spacing:"1rem",alignItems:"flex-start",style:{maxWidth:"100%",height:"80vh"},children:[/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.Carousel,_objectSpread(_objectSpread({},props),{},{autoAlign:!0,children:/*#__PURE__*/(0,_jsxRuntime.jsxs)(_styles.CarouselContainerExample,{children:[/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.CarouselSlideItem,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselItemExample,{style:{height:"100px",width:"250px"},children:"1"})}),/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.CarouselSlideItem,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselItemExample,{style:{height:"100px",width:"150px"},children:"2"})}),/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.CarouselSlideItem,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselItemExample,{style:{height:"100px",width:"50px"},children:"3"})}),/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.CarouselSlideItem,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselItemExample,{style:{height:"100px",width:"350px"},children:"4"})}),/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.CarouselSlideItem,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselItemExample,{style:{height:"100px",width:"350px"},children:"5"})}),/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.CarouselSlideItem,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselItemExample,{style:{height:"100px",width:"250px"},children:"6"})}),/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.CarouselSlideItem,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselItemExample,{style:{height:"100px",width:"150px"},children:"7"})}),/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.CarouselSlideItem,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselItemExample,{style:{height:"100px",width:"450px"},children:"8"})})]})})),/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.Carousel,_objectSpread(_objectSpread({},props),{},{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselContainerExample,{children:arrayTeste.map(function(item,index){return/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.CarouselSlideItem,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselItemExample,{onClick:function onClick(){console.log(item)},style:{height:"100px",width:"800px"},children:item})},"".concat(index,"-item-big"))})})})),/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.Carousel,_objectSpread(_objectSpread({},props),{},{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselContainerExample,{children:arrayTeste.map(function(item,index){return/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.CarouselSlideItem,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselItemExample,{style:{height:"100px",width:"300px"},children:item})},"".concat(index,"-item-large"))})})})),/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.Carousel,_objectSpread(_objectSpread({},props),{},{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselContainerExample,{children:arrayTeste.map(function(item,index){return/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.CarouselSlideItem,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselItemExample,{style:{height:"100px",width:"150px"},children:item})},"".concat(index,"-item-middle"))})})})),/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.Carousel,_objectSpread(_objectSpread({},props),{},{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselContainerExample,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.CarouselSlideItem,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselItemExample,{style:{height:"100px",width:"150px"},children:"S\xF3 um"})})})}))]})}function CarouselExampleDynamicChids(){return/*#__PURE__*/(0,_jsxRuntime.jsx)(_Flex.default,{style:{height:"500px"},children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.Carousel,{children:/*#__PURE__*/(0,_jsxRuntime.jsxs)(_styles.CarouselContainerExample,{children:[/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.CarouselSlideItem,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselItemExample,{style:{height:"100px",width:"250px"},children:"1"})}),/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.CarouselSlideItem,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselItemExample,{style:{height:"100px",width:"150px"},children:"2"})}),/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.CarouselSlideItem,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselItemExample,{style:{height:"100px",width:"50px"},children:"3"})}),/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.CarouselSlideItem,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselItemExample,{style:{height:"100px",width:"350px"},children:"4"})}),/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.CarouselSlideItem,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselItemExample,{style:{height:"100px",width:"350px"},children:"5"})}),/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.CarouselSlideItem,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselItemExample,{style:{height:"100px",width:"250px"},children:"6"})}),/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.CarouselSlideItem,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselItemExample,{style:{height:"100px",width:"150px"},children:"7"})}),/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.CarouselSlideItem,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselItemExample,{style:{height:"100px",width:"450px"},children:"8"})})]})})})}function CarouselExampleCustomButtons(){return/*#__PURE__*/(0,_jsxRuntime.jsx)(_Flex.default,{style:{height:"500px"},children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.Carousel,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselContainerExample,{leftButton:function leftButton(moveLeft){return/*#__PURE__*/(0,_jsxRuntime.jsx)(_Button.default,{onClick:function onClick(){moveLeft()},children:"Voltar"})},rightButton:function rightButton(moveRight){return/*#__PURE__*/(0,_jsxRuntime.jsx)(_Button.default,{style:{whiteSpace:"nowrap"},onClick:function onClick(){moveRight()},children:"Avan\xE7ar"})},children:arrayTeste.map(function(item,index){return/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.CarouselSlideItem,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselItemExample,{style:{height:"100%",width:"800px"},children:item})},"".concat(index,"-item-custom-button"))})})})})}function CarouselExampleControls(){return/*#__PURE__*/(0,_jsxRuntime.jsx)(_Flex.default,{style:{height:"500px"},children:/*#__PURE__*/(0,_jsxRuntime.jsxs)(_index.Carousel,{style:{position:"relative"},children:[/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselContainerExample,{leftButton:function leftButton(moveLeft){return/*#__PURE__*/(0,_jsxRuntime.jsx)(_Button.default,{onClick:function onClick(){moveLeft()},children:"Voltar"})},rightButton:function rightButton(moveRight){return/*#__PURE__*/(0,_jsxRuntime.jsx)(_Button.default,{style:{whiteSpace:"nowrap"},onClick:function onClick(){moveRight()},children:"Avan\xE7ar"})},children:arrayTeste.map(function(item,index){return/*#__PURE__*/(0,_jsxRuntime.jsx)(_index.CarouselSlideItem,{children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.CarouselItemExample,{style:{height:"100%",width:"100%"},children:item})},"".concat(index,"-item-custom-button"))})}),/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.ControlContainer,{children:arrayTeste.map(function(_,index){return/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.ControlItem,{position:index+1},"".concat(index,"-item-control-button"))})})]})})}
@@ -15,6 +15,7 @@ export declare const ControlItem: import("@emotion/styled").StyledComponent<Omit
15
15
  }, {}, {}>;
16
16
  export declare const CarouselContainerExample: import("@emotion/styled").StyledComponent<import("react").HTMLAttributes<HTMLDivElement> & {
17
17
  gap?: number | undefined;
18
+ autoAlign?: boolean | undefined;
18
19
  hideArrowButtons?: boolean | undefined;
19
20
  children: import("react").ReactNode;
20
21
  buttonShadow?: boolean | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Carousel/Examples/styles.ts"],"names":[],"mappings":";AAIA,eAAO,MAAM,mBAAmB;;;yGAO/B,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;UAgB5B,CAAC;AAEF,eAAO,MAAM,WAAW;;;;UAavB,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;;;;;;;UAAmC,CAAC"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Carousel/Examples/styles.ts"],"names":[],"mappings":";AAIA,eAAO,MAAM,mBAAmB;;;yGAO/B,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;UAgB5B,CAAC;AAEF,eAAO,MAAM,WAAW;;;;UAavB,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;;;;;;;;UAAmC,CAAC"}
@@ -2,6 +2,7 @@
2
2
  export declare const Carousel: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLDivElement> & {
3
3
  children?: import("react").ReactNode;
4
4
  } & {
5
+ autoAlign?: boolean | undefined;
5
6
  delayAutoExec?: number | undefined;
6
7
  } & import("react").RefAttributes<HTMLDivElement>>;
7
8
  //# sourceMappingURL=carousel-root.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"carousel-root.d.ts","sourceRoot":"","sources":["../../../src/components/Carousel/carousel-root.tsx"],"names":[],"mappings":";AAMA,eAAO,MAAM,QAAQ;;;;kDAQpB,CAAC"}
1
+ {"version":3,"file":"carousel-root.d.ts","sourceRoot":"","sources":["../../../src/components/Carousel/carousel-root.tsx"],"names":[],"mappings":";AAMA,eAAO,MAAM,QAAQ;;;;;kDAUpB,CAAC"}
@@ -1 +1 @@
1
- "use strict";function _typeof(obj){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.Carousel=void 0;var _react=require("react"),_carouselContext=require("./contexts/carousel-context"),_jsxRuntime=require("react/jsx-runtime"),_excluded=["children","delayAutoExec"];function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var source,i=1;i<arguments.length;i++)source=null==arguments[i]?{}:arguments[i],i%2?ownKeys(Object(source),!0).forEach(function(key){_defineProperty(target,key,source[key])}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))});return target}function _defineProperty(obj,key,value){return key=_toPropertyKey(key),key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return"symbol"===_typeof(key)?key:key+""}function _toPrimitive(input,hint){if("object"!==_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(prim!==void 0){var res=prim.call(input,hint||"default");if("object"!==_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}function _objectWithoutProperties(source,excluded){if(null==source)return{};var key,i,target=_objectWithoutPropertiesLoose(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++)key=sourceSymbolKeys[i],0<=excluded.indexOf(key)||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _objectWithoutPropertiesLoose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i<sourceKeys.length;i++)key=sourceKeys[i],0<=excluded.indexOf(key)||(target[key]=source[key]);return target}var Carousel=/*#__PURE__*/(0,_react.forwardRef)(function(_ref,ref){var children=_ref.children,delayAutoExec=_ref.delayAutoExec,rest=_objectWithoutProperties(_ref,_excluded);return/*#__PURE__*/(0,_jsxRuntime.jsx)("div",_objectSpread(_objectSpread({},rest),{},{ref:ref,style:_objectSpread({width:"100%"},null===rest||void 0===rest?void 0:rest.style),children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_carouselContext.CarouselProvider,{delayAutoExec:delayAutoExec,children:children})}))});exports.Carousel=Carousel,Carousel.displayName="Carousel";
1
+ "use strict";function _typeof(obj){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.Carousel=void 0;var _react=require("react"),_carouselContext=require("./contexts/carousel-context"),_jsxRuntime=require("react/jsx-runtime"),_excluded=["children","delayAutoExec","autoAlign"];function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var source,i=1;i<arguments.length;i++)source=null==arguments[i]?{}:arguments[i],i%2?ownKeys(Object(source),!0).forEach(function(key){_defineProperty(target,key,source[key])}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))});return target}function _defineProperty(obj,key,value){return key=_toPropertyKey(key),key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return"symbol"===_typeof(key)?key:key+""}function _toPrimitive(input,hint){if("object"!==_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(prim!==void 0){var res=prim.call(input,hint||"default");if("object"!==_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}function _objectWithoutProperties(source,excluded){if(null==source)return{};var key,i,target=_objectWithoutPropertiesLoose(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++)key=sourceSymbolKeys[i],0<=excluded.indexOf(key)||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _objectWithoutPropertiesLoose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i<sourceKeys.length;i++)key=sourceKeys[i],0<=excluded.indexOf(key)||(target[key]=source[key]);return target}var Carousel=/*#__PURE__*/(0,_react.forwardRef)(function(_ref,ref){var children=_ref.children,delayAutoExec=_ref.delayAutoExec,autoAdjust=_ref.autoAlign,rest=_objectWithoutProperties(_ref,_excluded);return/*#__PURE__*/(0,_jsxRuntime.jsx)("div",_objectSpread(_objectSpread({},rest),{},{ref:ref,style:_objectSpread({width:"100%"},null===rest||void 0===rest?void 0:rest.style),children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_carouselContext.CarouselProvider,{autoAlign:autoAdjust,delayAutoExec:delayAutoExec,children:children})}))});exports.Carousel=Carousel,Carousel.displayName="Carousel";
@@ -1,5 +1,5 @@
1
1
  import { PropsWithChildren } from 'react';
2
2
  import { CarouselContextProps, CarouselProviderProps } from './types';
3
3
  export declare const CarouselContext: import("react").Context<CarouselContextProps>;
4
- export declare function CarouselProvider({ children, delayAutoExec, }: PropsWithChildren & CarouselProviderProps): JSX.Element;
4
+ export declare function CarouselProvider({ children, delayAutoExec, autoAlign: autoAdjust, }: PropsWithChildren & CarouselProviderProps): JSX.Element;
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Carousel/contexts/carousel-context/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAmC,MAAM,OAAO,CAAC;AAK3E,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAEtE,eAAO,MAAM,eAAe,+CAAkE,CAAC;AAE/F,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,aAAa,GACd,EAAE,iBAAiB,GAAG,qBAAqB,eA2S3C"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Carousel/contexts/carousel-context/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAA8C,MAAM,OAAO,CAAC;AAMtF,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAEtE,eAAO,MAAM,eAAe,+CAAkE,CAAC;AAE/F,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,aAAa,EACb,SAAS,EAAE,UAAkB,GAC9B,EAAE,iBAAiB,GAAG,qBAAqB,eAwV3C"}
@@ -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("../../../../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
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CarouselContext=void 0,exports.CarouselProvider=CarouselProvider;var _react=require("react"),_useDebounce=require("../../../../shared/hooks/useDebounce"),_interval=require("../../../../shared/hooks/interval"),_array=require("../../../../utils/array"),_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,arrayOfChildrens=Array.from(container.childNodes),positions=arrayOfChildrens.map(function(data,index){return{offsetPosition:data.offsetLeft,offsetPositionPercent:data.offsetLeft-.3*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(){if(autoAdjust){var sliderInfo=getSliderInfo(),scrollLeft=null===sliderInfo||void 0===sliderInfo?void 0:sliderInfo.container.scrollLeft,containerWidth=null===sliderInfo||void 0===sliderInfo?void 0:sliderInfo.container.offsetWidth,maxVisibleWidth=0,activeIndex=-1;sliderInfo.positions.forEach(function(position,index){var start=position.offsetPosition,end=index<sliderInfo.positions.length-1?sliderInfo.positions[index+1].offsetPosition:sliderInfo.container.scrollWidth,visibleWidth=Math.min(end,scrollLeft+containerWidth)-Math.max(start,scrollLeft);visibleWidth>maxVisibleWidth&&(maxVisibleWidth=visibleWidth,activeIndex=index)}),-1!==activeIndex&&changeCurrent(activeIndex+1)}handleHideButtons()}function checkForScrollEnd(){var _sliderRef$current;if(sliderRef.current){var currentScrollPosition=null===(_sliderRef$current=sliderRef.current)||void 0===_sliderRef$current?void 0:_sliderRef$current.scrollLeft;currentScrollPosition===lastScrollPosition.current?onMomentumEnd():lastScrollPosition.current=currentScrollPosition}}function setScrollEndTimer(){clearTimeout(scrollEndTimer.current),scrollEndTimer.current=setTimeout(checkForScrollEnd,150)}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 position=getSliderInfo().positions.find(function(data){return data.position===index});position&&navigateToScroll(position.offsetPosition)}function changeCurrent(index){var sliderInfo=getSliderInfo();0>=index||index>sliderInfo.positions.length||scrollByIndex(index)}var momentumID,children=_ref.children,delayAutoExec=_ref.delayAutoExec,_ref$autoAlign=_ref.autoAlign,autoAdjust=void 0!==_ref$autoAlign&&_ref$autoAlign,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),lastScrollPosition=(0,_react.useRef)(0),scrollEndTimer=(0,_react.useRef)(),activeControlByScroll=(0,_useDebounce.useDebounce)(function(){var sliderInfo=getSliderInfo(),active=(0,_array.findLastIndex)(sliderInfo.positions,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
- 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})}
3
+ setCurrentActive(active+1)},100);return(0,_interval.useInterval)(function(){var sliderInfo=getSliderInfo();return currentActive===sliderInfo.positions.length?void changeCurrent(1):void changeCurrent(currentActive+1)},delay),(0,_react.useEffect)(function(){return function(){autoAdjust&&clearTimeout(scrollEndTimer.current)}},[]),/*#__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;autoAdjust&&(lastScrollPosition.current=event.currentTarget.scrollLeft,setScrollEndTimer());var 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,6 +1,7 @@
1
1
  import { RefObject } from 'react';
2
2
  export type CarouselProviderProps = {
3
3
  delayAutoExec?: number;
4
+ autoAlign?: boolean;
4
5
  };
5
6
  export type CarouselContextProps = {
6
7
  rightButtonRef: RefObject<HTMLDivElement>;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/Carousel/contexts/carousel-context/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,MAAM,MAAM,qBAAqB,GAAG;IAClC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,cAAc,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;IAC1C,aAAa,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;IACzC,SAAS,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;IACrC,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,eAAe,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,GAAG,IAAI,CAAC;IAC/C,eAAe,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,GAAG,IAAI,CAAC;IAC/C,WAAW,IAAI,IAAI,CAAC;IACpB,gBAAgB,IAAI,IAAI,CAAC;IACzB,WAAW,IAAI,IAAI,CAAC;IACpB,YAAY,CAAC,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC;IACzD,YAAY,CAAC,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC;IACzD,qBAAqB,IAAI,IAAI,CAAC;IAC9B,cAAc,CAAC,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACrC,eAAe,CAAC,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACtC,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,GAAG,IAAI,CAAC;IAC7C,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;CACjD,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/Carousel/contexts/carousel-context/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,MAAM,MAAM,qBAAqB,GAAG;IAClC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,cAAc,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;IAC1C,aAAa,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;IACzC,SAAS,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;IACrC,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,eAAe,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,GAAG,IAAI,CAAC;IAC/C,eAAe,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,GAAG,IAAI,CAAC;IAC/C,WAAW,IAAI,IAAI,CAAC;IACpB,gBAAgB,IAAI,IAAI,CAAC;IACzB,WAAW,IAAI,IAAI,CAAC;IACpB,YAAY,CAAC,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC;IACzD,YAAY,CAAC,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC;IACzD,qBAAqB,IAAI,IAAI,CAAC;IAC9B,cAAc,CAAC,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACrC,eAAe,CAAC,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACtC,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,GAAG,IAAI,CAAC;IAC7C,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;CACjD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Carousel/styles.ts"],"names":[],"mappings":";AAEA,eAAO,MAAM,eAAe;;;yGAa3B,CAAC;AAEF,eAAO,MAAM,eAAe;;;yGAiE3B,CAAC"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Carousel/styles.ts"],"names":[],"mappings":";AAEA,eAAO,MAAM,eAAe;;;yGAa3B,CAAC;AAEF,eAAO,MAAM,eAAe;;;yGAgE3B,CAAC"}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SliderContainer=exports.ContainerButton=void 0;var _templateObject,_templateObject2,_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 SliderContainer=_styled.default.div(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n -webkit-overflow-scrolling: touch;\n -ms-overflow-style: none;\n scrollbar-width: none;\n display: flex;\n width: 100%;\n height: 100%;\n cursor: pointer;\n overflow-x: auto;\n\n &::-webkit-scrollbar {\n display: none;\n }\n"])));exports.SliderContainer=SliderContainer;var ContainerButton=_styled.default.div(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n width: fit-content;\n display: flex;\n align-items: center;\n height: 100%;\n position: absolute;\n top: 50%;\n transform: translate(0px, -50%);\n\n transition: all ease 0.2s;\n justify-content: center;\n transition: all cubic-bezier(0.25, 1.5, 0.25, 1) 0.5s;\n\n &::before {\n content: '';\n position: absolute;\n height: 100%;\n width: 200%;\n z-index: -1;\n top: 0;\n transition: all cubic-bezier(0.25, 1.5, 0.25, 1) 0.5s;\n }\n\n &[aria-disabled='true'].right_button {\n * {\n pointer-events: none;\n user-select: none;\n }\n }\n\n &.left_button.button_shadow::before {\n left: -100%;\n background: ",";\n }\n\n &.right_button.button_shadow::before {\n right: -100%;\n background: ",";\n }\n\n &.hide {\n > button {\n display: none;\n }\n\n filter: brightness(0.8);\n }\n\n &:not(:hover).hide.left_button {\n transform: translate(-150%, -50%);\n }\n\n &:not(:hover).hide.right_button {\n transform: translate(150%, -50%);\n }\n\n &.right_button {\n right: 1rem;\n }\n\n &.left_button {\n left: 1rem;\n }\n"])),function(_ref){var theme=_ref.theme;return"linear-gradient(90deg, ".concat(theme.colors.neutral.white,"80 0%, rgba(255, 255, 255, 0) 100%)")},function(_ref2){var theme=_ref2.theme;return"linear-gradient(270deg, ".concat(theme.colors.neutral.white,"80 0%, rgba(255, 255, 255, 0) 100%)")});exports.ContainerButton=ContainerButton;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SliderContainer=exports.ContainerButton=void 0;var _templateObject,_templateObject2,_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 SliderContainer=_styled.default.div(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n -webkit-overflow-scrolling: touch;\n -ms-overflow-style: none;\n scrollbar-width: none;\n display: flex;\n width: 100%;\n height: 100%;\n cursor: pointer;\n overflow-x: auto;\n\n &::-webkit-scrollbar {\n display: none;\n }\n"])));exports.SliderContainer=SliderContainer;var ContainerButton=_styled.default.div(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n width: fit-content;\n display: flex;\n align-items: center;\n position: absolute;\n top: 50%;\n transform: translate(0px, -50%);\n\n transition: all ease 0.2s;\n justify-content: center;\n transition: all cubic-bezier(0.25, 1.5, 0.25, 1) 0.5s;\n\n &::before {\n content: '';\n position: absolute;\n height: 100%;\n width: 200%;\n z-index: -1;\n top: 0;\n transition: all cubic-bezier(0.25, 1.5, 0.25, 1) 0.5s;\n }\n\n &[aria-disabled='true'].right_button {\n * {\n pointer-events: none;\n user-select: none;\n }\n }\n\n &.left_button.button_shadow::before {\n left: -100%;\n background: ",";\n }\n\n &.right_button.button_shadow::before {\n right: -100%;\n background: ",";\n }\n\n &.hide {\n > button {\n display: none;\n }\n\n filter: brightness(0.8);\n }\n\n &:not(:hover).hide.left_button {\n transform: translate(-150%, -50%);\n }\n\n &:not(:hover).hide.right_button {\n transform: translate(150%, -50%);\n }\n\n &.right_button {\n right: 1rem;\n }\n\n &.left_button {\n left: 1rem;\n }\n"])),function(_ref){var theme=_ref.theme;return"linear-gradient(90deg, ".concat(theme.colors.neutral.white,"80 0%, rgba(255, 255, 255, 0) 100%)")},function(_ref2){var theme=_ref2.theme;return"linear-gradient(270deg, ".concat(theme.colors.neutral.white,"80 0%, rgba(255, 255, 255, 0) 100%)")});exports.ContainerButton=ContainerButton;
@@ -5,6 +5,7 @@ export type CarouselProps = HTMLAttributes<HTMLDivElement> & {
5
5
  * between each item in the carousel. If not provided, it will default to a value of 16.
6
6
  */
7
7
  gap?: number;
8
+ autoAlign?: boolean;
8
9
  hideArrowButtons?: boolean;
9
10
  children: ReactNode;
10
11
  buttonShadow?: boolean;
@@ -12,6 +13,7 @@ export type CarouselProps = HTMLAttributes<HTMLDivElement> & {
12
13
  rightButton?: (moveRight: () => void) => ReactNode;
13
14
  };
14
15
  export type CarouselRootProps = PropsWithChildren<HTMLAttributes<HTMLDivElement>> & {
16
+ autoAlign?: boolean;
15
17
  delayAutoExec?: number;
16
18
  };
17
19
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Carousel/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAErE,MAAM,MAAM,aAAa,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;IAC3D;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,EAAE,SAAS,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,SAAS,CAAC;IACjD,WAAW,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,IAAI,KAAK,SAAS,CAAC;CACpD,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,iBAAiB,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC,GAAG;IAClF,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Carousel/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAErE,MAAM,MAAM,aAAa,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;IAC3D;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,EAAE,SAAS,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,SAAS,CAAC;IACjD,WAAW,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,IAAI,KAAK,SAAS,CAAC;CACpD,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,iBAAiB,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC,GAAG;IAClF,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function findLastIndex<T>(array: T[], predicate: (value: T, index: number, obj: T[]) => boolean): number;
2
+ //# sourceMappingURL=array.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../src/utils/array.ts"],"names":[],"mappings":"AAAA,wBAAgB,aAAa,CAAC,CAAC,EAC7B,KAAK,EAAE,CAAC,EAAE,EACV,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,OAAO,GACxD,MAAM,CAOR"}
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.findLastIndex=findLastIndex;function findLastIndex(array,predicate){for(var i=array.length-1;0<=i;i--)if(predicate(array[i],i,array))return i;return-1}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pedidopago/ui",
3
- "version": "1.12.18",
3
+ "version": "1.12.19",
4
4
  "description": "Quick build beatiful Pedido Pago apps",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",