UNPKG

@base-ui-components/react

Version:

Base UI is a library of headless ('unstyled') React components and low-level hooks. You gain complete control over your app's CSS and accessibility features.

5 lines (4 loc) 878 B
// This file is autogenerated. Do not edit it directly. // To update it, modify the corresponding source file and run `pnpm inline-scripts`. // prettier-ignore export const script = '!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest(\'[role="tablist"]\');if(!e)return;const f=e.querySelector("[data-selected]");if(!f)return;if(0===f.offsetWidth||0===e.offsetWidth)return;const o=getComputedStyle(e).direction,i=f.offsetLeft-e.clientLeft,r="ltr"===o?e.scrollWidth-f.offsetLeft-f.offsetWidth-e.clientLeft:f.offsetLeft-e.clientLeft,s=f.offsetTop-e.clientTop,n=e.scrollHeight-f.offsetTop-f.offsetHeight-e.clientTop,c=f.offsetWidth,l=f.offsetHeight;function d(e,f){t.style.setProperty(`--active-tab-${e}`,`${f}px`)}d("left",i),d("right",r),d("top",s),d("bottom",n),d("width",c),d("height",l),c>0&&l>0&&t.removeAttribute("hidden")}();';