@gv-tech/ui-web 2.19.0 → 2.21.0
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/accordion-Be1vGv6M.js +1 -0
- package/dist/accordion-DXnU0LgU.mjs +221 -0
- package/dist/accordion.cjs +1 -1
- package/dist/accordion.mjs +3 -259
- package/dist/alert-dialog-BXRY0Ghq.js +7 -0
- package/dist/alert-dialog-fcZ-sL7h.mjs +164 -0
- package/dist/alert-dialog.cjs +1 -7
- package/dist/alert-dialog.mjs +4 -171
- package/dist/alert.cjs +1 -1
- package/dist/alert.mjs +35 -32
- package/dist/aspect-ratio-BP5HarYZ.js +1 -0
- package/dist/aspect-ratio-Bp8HMg-1.mjs +33 -0
- package/dist/aspect-ratio.cjs +1 -1
- package/dist/aspect-ratio.mjs +3 -43
- package/dist/avatar-klFl8Sqa.js +1 -0
- package/dist/avatar-vGm9JN1a.mjs +184 -0
- package/dist/avatar.cjs +1 -1
- package/dist/avatar.mjs +3 -205
- package/dist/badge.cjs +1 -1
- package/dist/badge.mjs +21 -24
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.mjs +60 -68
- package/dist/button.cjs +1 -1
- package/dist/button.mjs +40 -40
- package/dist/calendar-aIuSXzs7.js +1 -0
- package/dist/calendar-oitID53a.mjs +3154 -0
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.mjs +4 -2976
- package/dist/card.cjs +1 -1
- package/dist/card.mjs +42 -32
- package/dist/carousel-BjTSkVh9.js +1 -0
- package/dist/carousel-CENzZCXN.mjs +1178 -0
- package/dist/carousel.cjs +1 -1
- package/dist/carousel.mjs +4 -1403
- package/dist/chart.cjs +4 -4
- package/dist/chart.d.ts +3 -35
- package/dist/chart.mjs +123 -182
- package/dist/checkbox-Bwq7mXA2.mjs +170 -0
- package/dist/checkbox-DzEO1q4R.js +1 -0
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.mjs +3 -258
- package/dist/collapsible.cjs +1 -1
- package/dist/collapsible.mjs +6 -7
- package/dist/command-D7hksKY6.js +1 -0
- package/dist/command-Ws_iF1hM.mjs +531 -0
- package/dist/command.cjs +1 -1
- package/dist/command.mjs +3 -396
- package/dist/context-menu-DJbgNJ7N.js +1 -0
- package/dist/context-menu-fu39gePi.mjs +292 -0
- package/dist/context-menu.cjs +1 -1
- package/dist/context-menu.mjs +3 -328
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.mjs +50 -66
- package/dist/dist-0FXx-pUX.js +1 -0
- package/dist/dist-4A0ut6a8.mjs +10 -0
- package/dist/dist-ALQAoSGx.mjs +10 -0
- package/dist/dist-B4N_7Tps.js +1 -0
- package/dist/dist-B5776DvK.js +5 -0
- package/dist/dist-B57mzJP3.mjs +28 -0
- package/dist/dist-B5VmV2K7.js +1 -0
- package/dist/dist-BBRD-Qfb.js +1 -0
- package/dist/dist-BC_VB6JL.mjs +25 -0
- package/dist/dist-BKFtvTm8.mjs +6 -0
- package/dist/dist-BUS_s_6N.js +1 -0
- package/dist/dist-BVKPqhkg.js +1 -0
- package/dist/dist-Ba7mQG9D.mjs +117 -0
- package/dist/dist-BeFCyPgD.js +1 -0
- package/dist/dist-Bf4P28CV.js +1 -0
- package/dist/dist-BfFVoFJN.js +1 -0
- package/dist/dist-BhtQH_6Z.js +1 -0
- package/dist/dist-BmjFh8i_.mjs +5 -0
- package/dist/dist-BrCTkQXt.mjs +62 -0
- package/dist/dist-BxmpAHsT.mjs +219 -0
- package/dist/dist-C2ArLRnq.js +1 -0
- package/dist/dist-C2pRTcV_.mjs +62 -0
- package/dist/dist-C9wnUiS4.mjs +27 -0
- package/dist/dist-CIRItnqs.js +1 -0
- package/dist/dist-CL1DhkaL.js +1 -0
- package/dist/dist-CRe7xawr.js +1 -0
- package/dist/dist-CUFjt0cI.js +1 -0
- package/dist/dist-CaaGWewc.mjs +557 -0
- package/dist/dist-Ci2whnVp.js +1 -0
- package/dist/dist-CmBtqW5f.js +1 -0
- package/dist/dist-CsEsK2jW.js +1 -0
- package/dist/dist-CscAxhT8.js +1 -0
- package/dist/dist-CvtF5JdF.mjs +95 -0
- package/dist/dist-Cvwtowos.mjs +77 -0
- package/dist/dist-D2f83VMO.mjs +73 -0
- package/dist/dist-Dh_jWJh-.mjs +11 -0
- package/dist/dist-DikyKBU3.mjs +12 -0
- package/dist/dist-DmmUjo_P.js +1 -0
- package/dist/dist-DqvQ5UFr.mjs +38 -0
- package/dist/dist-FGQAMrhH.mjs +29 -0
- package/dist/dist-Jtk3jeb9.mjs +18 -0
- package/dist/dist-Kqk0oQYU.js +1 -0
- package/dist/dist-VI9bl_Wk.mjs +45 -0
- package/dist/dist-Z7lEV5Nx.mjs +1282 -0
- package/dist/dist-_Osar3kp.js +1 -0
- package/dist/dist-bDoR0CBU.mjs +112 -0
- package/dist/dist-cRjbOZRf.js +1 -0
- package/dist/dist-d_pecHgw.mjs +66 -0
- package/dist/dist-r36zVVcK.js +1 -0
- package/dist/dist-sRlXdzvf.mjs +152 -0
- package/dist/drawer.cjs +1 -1
- package/dist/drawer.mjs +48 -54
- package/dist/dropdown-menu-BGkQXJ-r.mjs +288 -0
- package/dist/dropdown-menu-uGMnmGL-.js +1 -0
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.mjs +3 -316
- package/dist/es2015-Cx0gpR1a.js +41 -0
- package/dist/es2015-a1b8kENC.mjs +701 -0
- package/dist/form.cjs +1 -1
- package/dist/form.mjs +76 -67
- package/dist/hover-card-DdIYJP-Q.mjs +167 -0
- package/dist/hover-card-Ua-2KlY-.js +1 -0
- package/dist/hover-card.cjs +1 -1
- package/dist/hover-card.mjs +3 -188
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +3 -35
- package/dist/index.mjs +56 -296
- package/dist/input.cjs +1 -1
- package/dist/input.mjs +14 -19
- package/dist/jsx-runtime-CN3qjQQx.js +6 -0
- package/dist/jsx-runtime-CW53Uo-e.mjs +189 -0
- package/dist/label-8YSUv4kt.js +1 -0
- package/dist/label-Bur66PVg.mjs +22 -0
- package/dist/label.cjs +1 -1
- package/dist/label.mjs +3 -22
- package/dist/menubar-Bq1Sfbf5.js +1 -0
- package/dist/menubar-D2fY6zkQ.mjs +410 -0
- package/dist/menubar.cjs +1 -1
- package/dist/menubar.mjs +3 -473
- package/dist/navigation-menu-BuOakbgA.mjs +602 -0
- package/dist/navigation-menu-so6EvLAY.js +1 -0
- package/dist/navigation-menu.cjs +1 -1
- package/dist/navigation-menu.mjs +3 -673
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.mjs +63 -68
- package/dist/popover-BUADXRkO.mjs +201 -0
- package/dist/popover-nBrSPqHk.js +1 -0
- package/dist/popover.cjs +1 -1
- package/dist/popover.mjs +3 -242
- package/dist/progress-BTApMbqg.js +6 -0
- package/dist/progress-BbN-RNvs.mjs +81 -0
- package/dist/progress.cjs +1 -6
- package/dist/progress.mjs +3 -99
- package/dist/radio-group-C5oprOrt.mjs +193 -0
- package/dist/radio-group-FDXr6VLM.js +1 -0
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.mjs +3 -253
- package/dist/resizable-ChdgCzzx.mjs +1534 -0
- package/dist/resizable-ztiFzq_y.js +1 -0
- package/dist/resizable.cjs +1 -1
- package/dist/resizable.mjs +3 -1990
- package/dist/scroll-area-3o0-cc3n.mjs +520 -0
- package/dist/scroll-area-DXZqIKXN.js +1 -0
- package/dist/scroll-area.cjs +1 -1
- package/dist/scroll-area.mjs +3 -546
- package/dist/scroll-to-top.cjs +1 -1
- package/dist/scroll-to-top.mjs +71 -84
- package/dist/search.cjs +1 -1
- package/dist/search.mjs +53 -63
- package/dist/select-B2qM503G.mjs +744 -0
- package/dist/select-BHCeW-MD.js +1 -0
- package/dist/select.cjs +1 -1
- package/dist/select.mjs +3 -908
- package/dist/separator-BZJ-SDvg.js +1 -0
- package/dist/separator-DJ_IwKUQ.mjs +31 -0
- package/dist/separator.cjs +1 -1
- package/dist/separator.mjs +3 -35
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.mjs +59 -66
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.mjs +13 -7
- package/dist/slider-CJJPQ0fH.mjs +366 -0
- package/dist/slider-DHccqrW2.js +1 -0
- package/dist/slider.cjs +1 -1
- package/dist/slider.mjs +3 -442
- package/dist/sonner.cjs +1 -1
- package/dist/sonner.mjs +21 -24
- package/dist/support-fab.cjs +1 -1
- package/dist/support-fab.mjs +81 -117
- package/dist/switch-BbcAUYjl.mjs +103 -0
- package/dist/switch-DZfRzgWs.js +1 -0
- package/dist/switch.cjs +1 -1
- package/dist/switch.mjs +3 -149
- package/dist/table-of-contents.cjs +1 -1
- package/dist/table-of-contents.mjs +159 -155
- package/dist/table.cjs +1 -1
- package/dist/table.mjs +58 -57
- package/dist/tabs-BEy0IIV0.js +1 -0
- package/dist/tabs-DqAKyl9T.mjs +136 -0
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.mjs +3 -195
- package/dist/text.cjs +1 -1
- package/dist/text.mjs +41 -42
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.mjs +12 -17
- package/dist/theme-provider.cjs +1 -1
- package/dist/theme-provider.mjs +15 -7
- package/dist/theme-toggle-DKQmD-FO.js +1 -0
- package/dist/theme-toggle-dQbFWNI8.mjs +65 -0
- package/dist/theme-toggle.cjs +1 -1
- package/dist/theme-toggle.mjs +3 -8
- package/dist/toast-C84Cpidq.js +1 -0
- package/dist/toast-CQbUslcw.mjs +427 -0
- package/dist/toast.cjs +1 -1
- package/dist/toast.mjs +3 -494
- package/dist/toaster-BpcpNRz1.js +1 -0
- package/dist/toaster-i6giQYiq.mjs +126 -0
- package/dist/toaster.cjs +1 -1
- package/dist/toaster.mjs +3 -6
- package/dist/toggle-group-B2S7fkhA.mjs +155 -0
- package/dist/toggle-group-BNn6MNiJ.js +1 -0
- package/dist/toggle-group.cjs +1 -1
- package/dist/toggle-group.mjs +3 -170
- package/dist/toggle.cjs +1 -1
- package/dist/toggle.mjs +19 -14
- package/dist/tooltip-CElrNodA.js +1 -0
- package/dist/tooltip-oKfTBTbv.mjs +364 -0
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.mjs +3 -342
- package/dist/utils-BxDanjP7.js +1 -0
- package/dist/utils-yc5uc46c.mjs +11 -0
- package/package.json +2 -2
- package/src/chart.tsx +7 -7
- package/src/setupTests.ts +5 -4
- package/dist/index-0ioNhtNM.mjs +0 -10
- package/dist/index-3j-XAIXT.mjs +0 -55
- package/dist/index-B2XtpfGY.js +0 -1
- package/dist/index-B39Lzq0v.js +0 -1
- package/dist/index-B7n6fy75.js +0 -1
- package/dist/index-B8dxbSWX.js +0 -41
- package/dist/index-BGIK9FQF.js +0 -1
- package/dist/index-BZPx6jYI.mjs +0 -8
- package/dist/index-BoNjHhm4.js +0 -1
- package/dist/index-BtZvtDmp.js +0 -1
- package/dist/index-Bv7qrYW6.mjs +0 -180
- package/dist/index-ByiPJW53.js +0 -5
- package/dist/index-C0dlIQIi.js +0 -1
- package/dist/index-C1qb0595.mjs +0 -27
- package/dist/index-C7HEunrh.mjs +0 -15
- package/dist/index-C8ni3LLa.js +0 -1
- package/dist/index-CCKe-Mpx.mjs +0 -6
- package/dist/index-CD6_IrA-.mjs +0 -10
- package/dist/index-CRyCZJLa.mjs +0 -677
- package/dist/index-CVx1AgNG.mjs +0 -615
- package/dist/index-Ce5TOFAK.js +0 -1
- package/dist/index-CeSLNJ60.mjs +0 -32
- package/dist/index-CefEQe_4.js +0 -1
- package/dist/index-Cj5hzyBi.js +0 -1
- package/dist/index-Cjj_rUPu.js +0 -1
- package/dist/index-Cl3G0jzM.js +0 -1
- package/dist/index-CwfE56Ep.mjs +0 -1545
- package/dist/index-CwyAfCwY.js +0 -1
- package/dist/index-CzY-WZXL.js +0 -1
- package/dist/index-D2HnlO3y.js +0 -1
- package/dist/index-DFdF7K7v.mjs +0 -50
- package/dist/index-DIsg7zU7.js +0 -1
- package/dist/index-DKN_vhyX.mjs +0 -32
- package/dist/index-DLcqcWxM.mjs +0 -29
- package/dist/index-DSxf1gN6.mjs +0 -118
- package/dist/index-DYxWvftI.js +0 -1
- package/dist/index-DaILh3TV.mjs +0 -32
- package/dist/index-Dfzl8TxY.mjs +0 -136
- package/dist/index-Dko2XdTk.js +0 -1
- package/dist/index-DlY82G31.mjs +0 -245
- package/dist/index-DnFcfnA9.mjs +0 -13
- package/dist/index-IZ2gq03c.mjs +0 -68
- package/dist/index-K9FzbxYw.mjs +0 -93
- package/dist/index-Le8p9oP4.mjs +0 -60
- package/dist/index-MQ0c3ZX_.js +0 -1
- package/dist/index-_XxjJPRD.js +0 -1
- package/dist/index-_wdrnYim.js +0 -1
- package/dist/index-jv3B4mTd.js +0 -1
- package/dist/index-kaM0u2Q1.js +0 -1
- package/dist/index-p6xVFRb4.mjs +0 -52
- package/dist/index-rKs9bXHr.mjs +0 -6
- package/dist/index-vuPgkS0V.mjs +0 -70
- package/dist/jsx-runtime-nZSsnGb7.js +0 -6
- package/dist/jsx-runtime-tc70JA_2.mjs +0 -264
- package/dist/theme-toggle-DXQGNfCe.js +0 -1
- package/dist/theme-toggle-tHXIbr8W.mjs +0 -79
- package/dist/toaster-C_S9hnXa.js +0 -1
- package/dist/toaster-k5DnQSsh.mjs +0 -118
- package/dist/utils-DY6fhrgS.mjs +0 -12
- package/dist/utils-cdbZV8DZ.js +0 -1
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
const e=require(`./jsx-runtime-CN3qjQQx.js`),t=require(`./dist-CsEsK2jW.js`),n=require(`./dist-DmmUjo_P.js`),r=require(`./dist-cRjbOZRf.js`);let i=require(`react`),a=e.i(i,1);i=e.i(i);var o=e.t(),s=`focusScope.autoFocusOnMount`,c=`focusScope.autoFocusOnUnmount`,l={bubbles:!1,cancelable:!0},u=`FocusScope`,d=a.forwardRef((e,i)=>{let{loop:u=!1,trapped:d=!1,onMountAutoFocus:h,onUnmountAutoFocus:g,..._}=e,[b,x]=a.useState(null),S=r.t(h),C=r.t(g),w=a.useRef(null),T=t.n(i,e=>x(e)),E=a.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;a.useEffect(()=>{if(d){let e=function(e){if(E.paused||!b)return;let t=e.target;b.contains(t)?w.current=t:v(w.current,{select:!0})},t=function(e){if(E.paused||!b)return;let t=e.relatedTarget;t!==null&&(b.contains(t)||v(w.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&v(b)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return b&&r.observe(b,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[d,b,E.paused]),a.useEffect(()=>{if(b){y.add(E);let e=document.activeElement;if(!b.contains(e)){let t=new CustomEvent(s,l);b.addEventListener(s,S),b.dispatchEvent(t),t.defaultPrevented||(f(ee(m(b)),{select:!0}),document.activeElement===e&&v(b))}return()=>{b.removeEventListener(s,S),setTimeout(()=>{let t=new CustomEvent(c,l);b.addEventListener(c,C),b.dispatchEvent(t),t.defaultPrevented||v(e??document.body,{select:!0}),b.removeEventListener(c,C),y.remove(E)},0)}}},[b,S,C,E]);let te=a.useCallback(e=>{if(!u&&!d||E.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){let t=e.currentTarget,[r,i]=p(t);r&&i?!e.shiftKey&&n===i?(e.preventDefault(),u&&v(r,{select:!0})):e.shiftKey&&n===r&&(e.preventDefault(),u&&v(i,{select:!0})):n===t&&e.preventDefault()}},[u,d,E.paused]);return(0,o.jsx)(n.t.div,{tabIndex:-1,..._,ref:T,onKeyDown:te})});d.displayName=u;function f(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(v(r,{select:t}),document.activeElement!==n)return}function p(e){let t=m(e);return[h(t,e),h(t.reverse(),e)]}function m(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function h(e,t){for(let n of e)if(!g(n,{upTo:t}))return n}function g(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function _(e){return e instanceof HTMLInputElement&&`select`in e}function v(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&_(e)&&t&&e.select()}}var y=b();function b(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=x(e,t),e.unshift(t)},remove(t){e=x(e,t),e[0]?.resume()}}}function x(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function ee(e){return e.filter(e=>e.tagName!==`A`)}var S=0;function C(){a.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??w()),document.body.insertAdjacentElement(`beforeend`,e[1]??w()),S++,()=>{S===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),S--}},[])}function w(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var T=function(){return T=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},T.apply(this,arguments)};function E(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function te(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var D=`right-scroll-bar-position`,O=`width-before-scroll-bar`,ne=`with-scroll-bars-hidden`,re=`--removed-body-scroll-bar-size`;function k(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function ie(e,t){var n=(0,i.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var ae=typeof window<`u`?i.useLayoutEffect:i.useEffect,A=new WeakMap;function oe(e,t){var n=ie(t||null,function(t){return e.forEach(function(e){return k(e,t)})});return ae(function(){var t=A.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||k(e,null)}),i.forEach(function(e){r.has(e)||k(e,a)})}A.set(n,e)},[e]),n}function se(e){return e}function ce(e,t){t===void 0&&(t=se);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function le(e){e===void 0&&(e={});var t=ce(null);return t.options=T({async:!0,ssr:!1},e),t}var ue=function(e){var t=e.sideCar,n=E(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return i.createElement(r,T({},n))};ue.isSideCarExport=!0;function de(e,t){return e.useMedium(t),ue}var fe=le(),j=function(){},M=i.forwardRef(function(e,t){var n=i.useRef(null),r=i.useState({onScrollCapture:j,onWheelCapture:j,onTouchMoveCapture:j}),a=r[0],o=r[1],s=e.forwardProps,c=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=E(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),ee=p,S=oe([n,t]),C=T(T({},x),a);return i.createElement(i.Fragment,null,d&&i.createElement(ee,{sideCar:fe,removeScrollBar:u,shards:f,noRelative:m,noIsolation:h,inert:g,setCallbacks:o,allowPinchZoom:!!_,lockRef:n,gapMode:b}),s?i.cloneElement(i.Children.only(c),T(T({},C),{ref:S})):i.createElement(y,T({},C,{className:l,ref:S}),c))});M.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},M.classNames={fullWidth:O,zeroRight:D};var N,pe=function(){if(N)return N;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function me(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=pe();return t&&e.setAttribute(`nonce`,t),e}function he(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ge(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var _e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=me())&&(he(t,n),ge(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ve=function(){var e=_e();return function(t,n){i.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},P=function(){var e=ve();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},ye={left:0,top:0,right:0,gap:0},F=function(e){return parseInt(e||``,10)||0},be=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[F(n),F(r),F(i)]},xe=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return ye;var t=be(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Se=P(),I=`data-scroll-locked`,Ce=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
2
|
+
.${ne} {
|
|
3
|
+
overflow: hidden ${r};
|
|
4
|
+
padding-right: ${s}px ${r};
|
|
5
|
+
}
|
|
6
|
+
body[${I}] {
|
|
7
|
+
overflow: hidden ${r};
|
|
8
|
+
overscroll-behavior: contain;
|
|
9
|
+
${[t&&`position: relative ${r};`,n===`margin`&&`
|
|
10
|
+
padding-left: ${i}px;
|
|
11
|
+
padding-top: ${a}px;
|
|
12
|
+
padding-right: ${o}px;
|
|
13
|
+
margin-left:0;
|
|
14
|
+
margin-top:0;
|
|
15
|
+
margin-right: ${s}px ${r};
|
|
16
|
+
`,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.${D} {
|
|
20
|
+
right: ${s}px ${r};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.${O} {
|
|
24
|
+
margin-right: ${s}px ${r};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.${D} .${D} {
|
|
28
|
+
right: 0 ${r};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.${O} .${O} {
|
|
32
|
+
margin-right: 0 ${r};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
body[${I}] {
|
|
36
|
+
${re}: ${s}px;
|
|
37
|
+
}
|
|
38
|
+
`},L=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},we=function(){i.useEffect(function(){return document.body.setAttribute(I,(L()+1).toString()),function(){var e=L()-1;e<=0?document.body.removeAttribute(I):document.body.setAttribute(I,e.toString())}},[])},Te=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=r===void 0?`margin`:r;we();var o=i.useMemo(function(){return xe(a)},[a]);return i.createElement(Se,{styles:Ce(o,!t,a,n?``:`!important`)})},R=!1;if(typeof window<`u`)try{var z=Object.defineProperty({},`passive`,{get:function(){return R=!0,!0}});window.addEventListener(`test`,z,z),window.removeEventListener(`test`,z,z)}catch{R=!1}var B=R?{passive:!1}:!1,Ee=function(e){return e.tagName===`TEXTAREA`},V=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!Ee(e)&&n[t]===`visible`)},De=function(e){return V(e,`overflowY`)},Oe=function(e){return V(e,`overflowX`)},H=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),U(e,r)){var i=W(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},ke=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Ae=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},U=function(e,t){return e===`v`?De(t):Oe(t)},W=function(e,t){return e===`v`?ke(t):Ae(t)},je=function(e,t){return e===`h`&&t===`rtl`?-1:1},Me=function(e,t,n,r,i){var a=je(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=W(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&U(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},G=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},K=function(e){return[e.deltaX,e.deltaY]},q=function(e){return e&&`current`in e?e.current:e},Ne=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Pe=function(e){return`
|
|
39
|
+
.block-interactivity-${e} {pointer-events: none;}
|
|
40
|
+
.allow-interactivity-${e} {pointer-events: all;}
|
|
41
|
+
`},Fe=0,J=[];function Ie(e){var t=i.useRef([]),n=i.useRef([0,0]),r=i.useRef(),a=i.useState(Fe++)[0],o=i.useState(P)[0],s=i.useRef(e);i.useEffect(function(){s.current=e},[e]),i.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${a}`);var t=te([e.lockRef.current],(e.shards||[]).map(q),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${a}`)}),function(){document.body.classList.remove(`block-interactivity-${a}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${a}`)})}}},[e.inert,e.lockRef.current,e.shards]);var c=i.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!s.current.allowPinchZoom;var i=G(e),a=n.current,o=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(o)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=H(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=H(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(o||c)&&(r.current=l),!l)return!0;var h=r.current||l;return Me(h,t,e,h===`h`?o:c,!0)},[]),l=i.useCallback(function(e){var n=e;if(!(!J.length||J[J.length-1]!==o)){var r=`deltaY`in n?K(n):G(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Ne(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var a=(s.current.shards||[]).map(q).filter(Boolean).filter(function(e){return e.contains(n.target)});(a.length>0?c(n,a[0]):!s.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),u=i.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Le(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),d=i.useCallback(function(e){n.current=G(e),r.current=void 0},[]),f=i.useCallback(function(t){u(t.type,K(t),t.target,c(t,e.lockRef.current))},[]),p=i.useCallback(function(t){u(t.type,G(t),t.target,c(t,e.lockRef.current))},[]);i.useEffect(function(){return J.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener(`wheel`,l,B),document.addEventListener(`touchmove`,l,B),document.addEventListener(`touchstart`,d,B),function(){J=J.filter(function(e){return e!==o}),document.removeEventListener(`wheel`,l,B),document.removeEventListener(`touchmove`,l,B),document.removeEventListener(`touchstart`,d,B)}},[]);var m=e.removeScrollBar,h=e.inert;return i.createElement(i.Fragment,null,h?i.createElement(o,{styles:Pe(a)}):null,m?i.createElement(Te,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Le(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Re=de(fe,Ie),ze=i.forwardRef(function(e,t){return i.createElement(M,T({},e,{ref:t,sideCar:Re}))});ze.classNames=M.classNames;var Be=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Y=new WeakMap,X=new WeakMap,Z={},Q=0,$=function(e){return e&&(e.host||$(e.parentNode))},Ve=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=$(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},He=function(e,t,n,r){var i=Ve(t,Array.isArray(e)?e:[e]);Z[n]||(Z[n]=new WeakMap);var a=Z[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Y.get(e)||0)+1,l=(a.get(e)||0)+1;Y.set(e,c),a.set(e,l),o.push(e),c===1&&i&&X.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Q++,function(){o.forEach(function(e){var t=Y.get(e)-1,i=a.get(e)-1;Y.set(e,t),a.set(e,i),t||(X.has(e)||e.removeAttribute(r),X.delete(e)),i||e.removeAttribute(n)}),Q--,Q||(Y=new WeakMap,Y=new WeakMap,X=new WeakMap,Z={})}},Ue=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Be(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),He(r,i,n,`aria-hidden`)):function(){return null}};Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return ze}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return Ue}});
|