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.

11 lines (9 loc) 871 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.script = void 0; // This file is autogenerated. Do not edit it directly. // To update it, modify the corresponding source file and run `pnpm inline-scripts`. // prettier-ignore const script = exports.script = '!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest(\'[role="tablist"]\');if(!e)return;const i=e.querySelector("[data-selected]");if(!i)return;const{left:o,right:n,top:r,bottom:c,width:l}=i.getBoundingClientRect(),{left:u,right:s,top:d,bottom:f,width:g}=e.getBoundingClientRect();if(0===l||0===g)return;const h=s-n,b=r-d,p=f-c,m=n-o,a=c-r;function v(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}v("left",o-u),v("right",h),v("top",b),v("bottom",p),v("width",m),v("height",a),m>0&&a>0&&t.removeAttribute("hidden")}();';