aio-popup 6.6.0 → 6.6.1

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.
Files changed (3) hide show
  1. package/index.d.ts +1 -0
  2. package/index.js +13 -11
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -32,6 +32,7 @@ export type AP_modal = {
32
32
  fitHorizontal?: boolean;
33
33
  setAttrs?: AP_setAttrs;
34
34
  pageSelector?: string;
35
+ focus?: boolean;
35
36
  };
36
37
  export type AP_alert = {
37
38
  rtl?: boolean;
package/index.js CHANGED
@@ -284,7 +284,9 @@ const Popup = ({ modal, isLast }) => {
284
284
  let popup = $(temp.dom.current);
285
285
  popup.removeClass('not-mounted');
286
286
  $(temp.backdropDom.current).removeClass('not-mounted');
287
- popup.focus();
287
+ if (modal.focus !== false) {
288
+ popup.focus();
289
+ }
288
290
  }, 0);
289
291
  $(window).unbind('click', handleBackClick);
290
292
  $(window).bind('click', handleBackClick);
@@ -754,16 +756,16 @@ function getEasing(highlight) {
754
756
  const { easing } = highlight;
755
757
  var easingNames = [
756
758
  'linear',
757
- 'easeInQuad',
758
- 'easeInSine',
759
- 'easeInCirc',
760
- 'easeInBack',
761
- 'easeOutQuad',
762
- 'easeOutSine',
763
- 'easeOutCirc',
764
- 'easeInOutQuad',
765
- 'easeInOutSine',
766
- 'easeInOutBack',
759
+ 'easeInQuad', //1
760
+ 'easeInSine', //5
761
+ 'easeInCirc', //7
762
+ 'easeInBack', //8
763
+ 'easeOutQuad', //9
764
+ 'easeOutSine', //13
765
+ 'easeOutCirc', //15
766
+ 'easeInOutQuad', //18
767
+ 'easeInOutSine', //22
768
+ 'easeInOutBack', //25
767
769
  'easeOutBounce', //27
768
770
  ];
769
771
  if (typeof easing === 'number') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aio-popup",
3
- "version": "6.6.0",
3
+ "version": "6.6.1",
4
4
  "description": "handle all types of popup and modals in react",
5
5
  "main": "index.js",
6
6
  "scripts": {