@lumx/core 3.10.1-alpha.2 → 3.10.1-alpha.4
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.
- package/js/constants/design-tokens.js +2 -2
- package/js/constants/design-tokens.min.js +1 -1
- package/js/constants/design-tokens.min.js.map +1 -1
- package/js/constants/index.js +2 -2
- package/js/constants/index.min.js +1 -1
- package/js/constants/index.min.js.map +1 -1
- package/js/custom-colors.js +6 -7
- package/js/custom-colors.min.js +1 -1
- package/js/custom-colors.min.js.map +1 -1
- package/js/date-picker.js +90 -91
- package/js/date-picker.min.js +1 -1
- package/js/date-picker.min.js.map +1 -1
- package/js/utils.js +171 -200
- package/js/utils.min.js +1 -1
- package/js/utils.min.js.map +1 -1
- package/js/utils.ts +4 -5
- package/package.json +1 -1
package/js/utils.ts
CHANGED
|
@@ -5,7 +5,6 @@ import React from 'react';
|
|
|
5
5
|
import isBoolean from 'lodash/isBoolean';
|
|
6
6
|
import isEmpty from 'lodash/isEmpty';
|
|
7
7
|
import kebabCase from 'lodash/kebabCase';
|
|
8
|
-
import noop from 'lodash/noop';
|
|
9
8
|
|
|
10
9
|
/**
|
|
11
10
|
* Enhance isEmpty method to also works with numbers.
|
|
@@ -90,7 +89,7 @@ declare type SwipeDirection = 'none' | 'up' | 'down' | 'left' | 'right';
|
|
|
90
89
|
* @param handleSwipe Callback function.
|
|
91
90
|
* @return Function to remove listeners.
|
|
92
91
|
*/
|
|
93
|
-
export function detectSwipe(touchSurface: Element, handleSwipe
|
|
92
|
+
export function detectSwipe(touchSurface: Element, handleSwipe?: (direction: SwipeDirection) => void) {
|
|
94
93
|
let distX: number;
|
|
95
94
|
let distY: number;
|
|
96
95
|
let startX: number;
|
|
@@ -141,7 +140,7 @@ export function detectSwipe(touchSurface: Element, handleSwipe: (direction: Swip
|
|
|
141
140
|
direction = distY < 0 ? 'up' : 'down';
|
|
142
141
|
}
|
|
143
142
|
}
|
|
144
|
-
handleSwipe(direction);
|
|
143
|
+
handleSwipe?.(direction);
|
|
145
144
|
evt.preventDefault();
|
|
146
145
|
};
|
|
147
146
|
|
|
@@ -168,8 +167,8 @@ function isPassiveEventAvailable() {
|
|
|
168
167
|
supportsPassiveOption = true;
|
|
169
168
|
},
|
|
170
169
|
});
|
|
171
|
-
window.addEventListener('testPassiveEventSupport',
|
|
172
|
-
window.removeEventListener('testPassiveEventSupport',
|
|
170
|
+
window.addEventListener('testPassiveEventSupport', () => {}, opts);
|
|
171
|
+
window.removeEventListener('testPassiveEventSupport', () => {}, opts);
|
|
173
172
|
} catch (e) {
|
|
174
173
|
// ignored
|
|
175
174
|
}
|
package/package.json
CHANGED
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"update-version-changelog": "yarn version-changelog ../../CHANGELOG.md"
|
|
41
41
|
},
|
|
42
42
|
"sideEffects": false,
|
|
43
|
-
"version": "3.10.1-alpha.
|
|
43
|
+
"version": "3.10.1-alpha.4",
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@babel/core": "^7.18.13",
|
|
46
46
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|