alinea
Version:
[](https://npmjs.org/package/alinea) [](https://packagephobia.com/result?p=alinea)
24 lines (22 loc) • 566 B
JavaScript
// node_modules/@headlessui/react/dist/utils/bugs.js
function r(n) {
let e = n.parentElement, l = null;
for (; e && !(e instanceof HTMLFieldSetElement); )
e instanceof HTMLLegendElement && (l = e), e = e.parentElement;
let t = (e == null ? void 0 : e.getAttribute("disabled")) === "";
return t && i(l) ? false : t;
}
function i(n) {
if (!n)
return false;
let e = n.previousElementSibling;
for (; e !== null; ) {
if (e instanceof HTMLLegendElement)
return false;
e = e.previousElementSibling;
}
return true;
}
export {
r
};