Files
klz-cables.com/.pnpm-store/v10/files/99/9e51baf34927c0427a96de1101d6d0ac99afa80213a567dcca685a71fa90b8e979cd6f4b3f1fb83b9dfdd6b604de81721fb9c45710286eb3174aea245ce02e
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

39 lines
1.0 KiB
Plaintext

import css from './css';
import listen from './listen';
import triggerEvent from './triggerEvent';
function parseDuration(node) {
var str = css(node, 'transitionDuration') || '';
var mult = str.indexOf('ms') === -1 ? 1000 : 1;
return parseFloat(str) * mult;
}
function emulateTransitionEnd(element, duration, padding) {
if (padding === void 0) {
padding = 5;
}
var called = false;
var handle = setTimeout(function () {
if (!called) triggerEvent(element, 'transitionend', true);
}, duration + padding);
var remove = listen(element, 'transitionend', function () {
called = true;
}, {
once: true
});
return function () {
clearTimeout(handle);
remove();
};
}
export default function transitionEnd(element, handler, duration, padding) {
if (duration == null) duration = parseDuration(element) || 0;
var removeEmulate = emulateTransitionEnd(element, duration, padding);
var remove = listen(element, 'transitionend', handler);
return function () {
removeEmulate();
remove();
};
}