kitzo 1.0.3 → 1.0.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/dist/kitzo.d.ts +1 -1
- package/dist/kitzo.esm.js +5 -5
- package/dist/kitzo.umd.js +4 -4
- package/package.json +1 -1
package/dist/kitzo.d.ts
CHANGED
|
@@ -77,4 +77,4 @@ export function kitzoCopy(
|
|
|
77
77
|
}
|
|
78
78
|
): void;
|
|
79
79
|
|
|
80
|
-
export function
|
|
80
|
+
export function kitzoDebounce<Args extends any[]>(fn: (...args: Args) => any, delay?: number): (...args: Args) => void;
|
package/dist/kitzo.esm.js
CHANGED
|
@@ -64,7 +64,7 @@ const copyConfigMap = new WeakMap();
|
|
|
64
64
|
const allowedEvents = ['click', 'dblclick', 'contextmenu', 'mouseup', 'touchend'];
|
|
65
65
|
const attachedEvents = new Set();
|
|
66
66
|
|
|
67
|
-
function
|
|
67
|
+
function kitzoCopy(element, config = {}) {
|
|
68
68
|
config = Object.assign(
|
|
69
69
|
{
|
|
70
70
|
doc: '',
|
|
@@ -135,7 +135,7 @@ function copy(element, config = {}) {
|
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
function
|
|
138
|
+
function kitzoDebounce(fn, delay = 300) {
|
|
139
139
|
let timer;
|
|
140
140
|
|
|
141
141
|
return (...args) => {
|
|
@@ -186,7 +186,7 @@ function rippleStyles() {
|
|
|
186
186
|
//! Ripple effect
|
|
187
187
|
let rippleListenerAdded = false;
|
|
188
188
|
|
|
189
|
-
function
|
|
189
|
+
function kitzoRipple(element, config = {}) {
|
|
190
190
|
if (!element) {
|
|
191
191
|
console.error('A button element/selector is expected');
|
|
192
192
|
return;
|
|
@@ -330,7 +330,7 @@ let tooltipDiv;
|
|
|
330
330
|
let tooltipListenerAdded = false;
|
|
331
331
|
const tooltipConfigMap = new WeakMap();
|
|
332
332
|
|
|
333
|
-
function
|
|
333
|
+
function kitzoTooltip(element, config = {}) {
|
|
334
334
|
if (window.matchMedia('(pointer: coarse)').matches) return;
|
|
335
335
|
|
|
336
336
|
if (!element) {
|
|
@@ -451,4 +451,4 @@ function tooltip(element, config = {}) {
|
|
|
451
451
|
}
|
|
452
452
|
}
|
|
453
453
|
|
|
454
|
-
export {
|
|
454
|
+
export { kitzoCopy, kitzoDebounce, kitzoRipple, kitzoTooltip };
|
package/dist/kitzo.umd.js
CHANGED
|
@@ -457,9 +457,9 @@
|
|
|
457
457
|
}
|
|
458
458
|
}
|
|
459
459
|
|
|
460
|
-
exports.
|
|
461
|
-
exports.
|
|
462
|
-
exports.
|
|
463
|
-
exports.
|
|
460
|
+
exports.copy = copy;
|
|
461
|
+
exports.debounce = debounce;
|
|
462
|
+
exports.ripple = ripple;
|
|
463
|
+
exports.tooltip = tooltip;
|
|
464
464
|
|
|
465
465
|
}));
|