New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@zag-js/tabs

Package Overview
Dependencies
Maintainers
1
Versions
1028
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zag-js/tabs - npm Package Compare versions

Comparing version 0.0.0-dev-20220412162814 to 0.0.0-dev-20220412212252

2

dist/index.js

@@ -1,2 +0,2 @@

var p=Object.defineProperty;var H=Object.getOwnPropertyDescriptor;var _=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols;var y=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var b=(e,t,n)=>t in e?p(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,w=(e,t)=>{for(var n in t||(t={}))y.call(t,n)&&b(e,n,t[n]);if(h)for(var n of h(t))N.call(t,n)&&b(e,n,t[n]);return e};var W=e=>p(e,"__esModule",{value:!0});var z=(e,t)=>{for(var n in t)p(e,n,{get:t[n],enumerable:!0})},K=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of _(t))!y.call(e,a)&&(n||a!=="default")&&p(e,a,{get:()=>t[a],enumerable:!(r=H(t,a))||r.enumerable});return e};var U=(e=>(t,n)=>e&&e.get(t)||(n=K(W({}),t,1),e&&e.set(t,n),n))(typeof WeakMap!="undefined"?new WeakMap:0);var Q={};z(Q,{connect:()=>D,machine:()=>B});var f=e=>e?"":void 0;var E=new WeakMap;function q(e){var t;if(!e)return{};let n=E.get(e);return n||(n=((t=e==null?void 0:e.ownerDocument.defaultView)!=null?t:window).getComputedStyle(e),E.set(e,n)),n}function u(e){let t=new Set;function n(r){let a=globalThis.requestAnimationFrame(r);t.add(()=>globalThis.cancelAnimationFrame(a))}return n(()=>n(e)),function(){t.forEach(function(r){r()})}}var te=(()=>{let e=0;return()=>(e++,e.toString(36))})();function T(e){return typeof e=="object"&&(e==null?void 0:e.nodeType)===Node.ELEMENT_NODE&&typeof(e==null?void 0:e.nodeName)=="string"}var j=e=>(e==null?void 0:e.getAttribute("disabled"))!=null||!!(e==null?void 0:e.getAttribute("aria-disabled"));var x=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","embed","iframe","object","a[href]","area[href]","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","[contenteditable]:not([contenteditable=false])","details > summary:first-of-type"].join(",");function L(e,t){let n=q(e);if(!e||n.getPropertyValue("visibility")==="hidden")return!0;for(;e;){if(t!=null&&e===t)return!1;if(n.getPropertyValue("display")==="none")return!0;e=e.parentElement}return!1}var k=(e,t=!1)=>{if(!e)return[];let n=Array.from(e.querySelectorAll(x));return t&&T(e)&&n.unshift(e),n.filter(r=>$(r)&&!L(r))},$=e=>!T(e)||L(e)||j(e)?!1:e==null?void 0:e.matches(x);var A={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft",Home:"End",End:"Home"},G={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"};function I(e,t={}){var n;let{dir:r="ltr",orientation:a="horizontal"}=t,{key:i}=e;return i=(n=G[i])!=null?n:i,r==="rtl"&&a==="horizontal"&&i in A&&(i=A[i]),i}function P(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function m(e,t){return e.find(n=>n.id===t)}function C(e,t){let n=m(e,t);return n?e.indexOf(n):-1}function S(e,t,n=!0){let r=C(e,t);return r=n?(r+1)%e.length:Math.min(r+1,e.length-1),e[r]}function M(e,t,n=!0){let r=C(e,t);return r===-1?n?e[e.length-1]:null:(r=n?(r-1+e.length)%e.length:Math.max(0,r-1),e[r])}function Y(e){return{button:e,label:e,input:e,output:e,element:e}}var R=Y(e=>e);var V=e=>e[0],F=e=>e[e.length-1];var re=(()=>{let e=0;return()=>(e++,e.toString(36))})();var X=e=>Z()&&e.test(navigator.userAgent);var Z=()=>typeof window!="undefined";var O=()=>X(/^((?!chrome|android).)*safari/i);var o={getDoc:e=>{var t;return(t=e.doc)!=null?t:document},getRootId:e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`tabs-${e.uid}`},getTriggerGroupId:e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.triggerGroup)!=null?n:`tabs-${e.uid}-trigger-group`},getContentId:(e,t)=>{var n,r;return(r=(n=e.ids)==null?void 0:n.content)!=null?r:`tabs-${e.uid}-content-${t}`},getContentGroupId:e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.contentGroup)!=null?n:`tabs-${e.uid}-content-group`},getTriggerId:(e,t)=>{var n,r;return(r=(n=e.ids)==null?void 0:n.trigger)!=null?r:`tabs-${e.uid}-trigger-${t}`},getIndicatorId:e=>`tabs-${e.uid}-indicator`,getTriggerGroupEl:e=>o.getDoc(e).getElementById(o.getTriggerGroupId(e)),getContentEl:(e,t)=>o.getDoc(e).getElementById(o.getContentId(e,t)),getTriggerEl:(e,t)=>o.getDoc(e).getElementById(o.getTriggerId(e,t)),getIndicatorEl:e=>o.getDoc(e).getElementById(o.getIndicatorId(e)),getElements:e=>{let n=`[role=tab][data-ownedby='${CSS.escape(o.getTriggerGroupId(e))}']:not([disabled])`;return P(o.getTriggerGroupEl(e),n)},getFirstEl:e=>V(o.getElements(e)),getLastEl:e=>F(o.getElements(e)),getNextEl:(e,t)=>S(o.getElements(e),o.getTriggerId(e,t),e.loop),getPrevEl:(e,t)=>M(o.getElements(e),o.getTriggerId(e,t),e.loop),getRectById:(e,t)=>{var a;let n={offsetLeft:0,offsetTop:0,offsetWidth:0,offsetHeight:0},r=(a=m(o.getElements(e),o.getTriggerId(e,t)))!=null?a:n;return e.isVertical?{top:`${r.offsetTop}px`,height:`${r.offsetHeight}px`}:{left:`${r.offsetLeft}px`,width:`${r.offsetWidth}px`}},getActiveContentEl:e=>{if(!e.value)return;let t=o.getContentId(e,e.value);return o.getDoc(e).getElementById(t)}};function D(e,t,n=R){let r=e.context.messages,a=e.matches("focused");return{value:e.context.value,focusedValue:e.context.focusedValue,previousValues:Array.from(e.context.previousValues),setValue(i){t({type:"SET_VALUE",value:i})},rootProps:n.element({"data-part":"root",id:o.getRootId(e.context),"data-orientation":e.context.orientation,"data-focus":f(a),dir:e.context.dir}),triggerGroupProps:n.element({"data-part":"trigger-group",id:o.getTriggerGroupId(e.context),role:"tablist","data-focus":f(a),"aria-orientation":e.context.orientation,"data-orientation":e.context.orientation,"aria-label":r.tablistLabel,onKeyDown(i){let l={ArrowDown(){t("ARROW_DOWN")},ArrowUp(){t("ARROW_UP")},ArrowLeft(){t("ARROW_LEFT")},ArrowRight(){t("ARROW_RIGHT")},Home(){t("HOME")},End(){t("END")},Enter(){t({type:"ENTER",value:e.context.focusedValue})}},s=I(i,e.context),c=l[s];c&&(i.preventDefault(),c(i))}}),getTriggerProps(i){let{value:l,disabled:s}=i,c=e.context.value===l;return n.button({"data-part":"trigger",role:"tab",type:"button",disabled:s,"data-orientation":e.context.orientation,"data-disabled":f(s),"aria-disabled":s,"data-value":l,"aria-selected":c,"data-selected":f(c),"aria-controls":o.getContentId(e.context,l),"data-ownedby":o.getTriggerGroupId(e.context),id:o.getTriggerId(e.context,l),tabIndex:c?0:-1,onFocus(){t({type:"TAB_FOCUS",value:l})},onBlur(g){let v=g.relatedTarget;(v==null?void 0:v.getAttribute("role"))!=="tab"&&t({type:"TAB_BLUR"})},onClick(g){s||(O()&&g.currentTarget.focus(),t({type:"TAB_CLICK",value:l}))}})},contentGroupProps:n.element({"data-part":"content-group",id:o.getContentGroupId(e.context),"data-orientation":e.context.orientation}),getContentProps({value:i}){let l=e.context.value===i;return n.element({"data-part":"content",id:o.getContentId(e.context,i),tabIndex:0,"aria-labelledby":o.getTriggerId(e.context,i),role:"tabpanel","data-ownedby":o.getTriggerGroupId(e.context),hidden:!l})},getDeleteButtonProps({value:i,disabled:l}){var s;return n.button({"data-part":"delete-button",type:"button",tabIndex:-1,"aria-label":(s=r.deleteLabel)==null?void 0:s.call(r,i),disabled:l,onClick(){t({type:"DELETE",value:i})}})},indicatorProps:n.element({id:o.getIndicatorId(e.context),"data-part":"indicator","data-orientation":e.context.orientation,style:w({"--transition-duration":"200ms","--transition-property":"left, right, top, bottom, width, height",position:"absolute",willChange:"var(--transition-property)",transitionProperty:"var(--transition-property)",transitionDuration:e.context.hasMeasuredRect?"var(--transition-duration)":"0ms",transitionTimingFunction:"var(--transition-timing-function)"},e.context.indicatorRect)})}}var d=require("@zag-js/core");var{not:J}=d.guards,B=(0,d.createMachine)({initial:"unknown",context:{dir:"ltr",orientation:"horizontal",activationMode:"automatic",value:null,focusedValue:null,uid:"",previousValues:[],indicatorRect:{left:"0px",top:"0px",width:"0px",height:"0px"},hasMeasuredRect:!1,isIndicatorRendered:!1,loop:!0,messages:{}},computed:{isHorizontal:e=>e.orientation==="horizontal",isVertical:e=>e.orientation==="vertical"},created:["setPrevSelectedTabs"],watch:{focusedValue:"invokeOnFocus",value:["invokeOnChange","setPrevSelectedTabs","setIndicatorRect","setContentTabIndex"],dir:["clearMeasured","setIndicatorRect"]},on:{SET_VALUE:{actions:"setValue"},DELETE:{actions:"deleteValue"}},states:{unknown:{on:{SETUP:{target:"idle",actions:["setupDocument","checkRenderedElements","setIndicatorRect","setContentTabIndex"]}}},idle:{on:{TAB_FOCUS:{guard:"selectOnFocus",target:"focused",actions:["setFocusedValue","setValue"]},TAB_CLICK:{target:"focused",actions:["setFocusedValue","setValue"]}}},focused:{on:{TAB_CLICK:{target:"focused",actions:["setFocusedValue","setValue"]},ARROW_LEFT:{guard:"isHorizontal",actions:"focusPrevTab"},ARROW_RIGHT:{guard:"isHorizontal",actions:"focusNextTab"},ARROW_UP:{guard:"isVertical",actions:"focusPrevTab"},ARROW_DOWN:{guard:"isVertical",actions:"focusNextTab"},HOME:{actions:"focusFirstTab"},END:{actions:"focusLastTab"},ENTER:{guard:J("selectOnFocus"),actions:"setValue"},TAB_FOCUS:[{guard:"selectOnFocus",actions:["setFocusedValue","setValue"]},{actions:"setFocusedValue"}],TAB_BLUR:{target:"idle",actions:"clearFocusedValue"}}}}},{guards:{isVertical:e=>e.isVertical,isHorizontal:e=>e.isHorizontal,selectOnFocus:e=>e.activationMode==="automatic"},actions:{setupDocument(e,t){e.uid=t.id,t.doc&&(e.doc=(0,d.ref)(t.doc))},setFocusedValue(e,t){e.focusedValue=t.value},clearFocusedValue(e){e.focusedValue=null},setValue(e,t){e.value=t.value},invokeOnDelete(e,t){var n;(n=e.onDelete)==null||n.call(e,{value:t.value})},focusFirstTab(e){u(()=>{var t;return(t=o.getFirstEl(e))==null?void 0:t.focus()})},focusLastTab(e){u(()=>{var t;return(t=o.getLastEl(e))==null?void 0:t.focus()})},focusNextTab(e){if(!e.focusedValue)return;let t=o.getNextEl(e,e.focusedValue);u(()=>t==null?void 0:t.focus())},focusPrevTab(e){if(!e.focusedValue)return;let t=o.getPrevEl(e,e.focusedValue);u(()=>t==null?void 0:t.focus())},setIndicatorRect(e){u(()=>{!e.isIndicatorRendered||!e.value||(e.indicatorRect=o.getRectById(e,e.value),!e.hasMeasuredRect&&u(()=>{e.hasMeasuredRect=!0}))})},checkRenderedElements(e){u(()=>{e.isIndicatorRendered=!!o.getIndicatorEl(e)})},clearMeasured(e){e.hasMeasuredRect=!1},invokeOnChange(e){var t;(t=e.onChange)==null||t.call(e,{value:e.value})},invokeOnFocus(e){var t;(t=e.onFocus)==null||t.call(e,{value:e.focusedValue})},setPrevSelectedTabs(e){if(e.value!=null){let t=Array.from(e.previousValues).concat(e.value);e.previousValues=Array.from(new Set(t))}},setContentTabIndex(e){u(()=>{let t=o.getActiveContentEl(e);if(!t)return;k(t).length>0?t.removeAttribute("tabindex"):t.setAttribute("tabindex","0")})}}});module.exports=U(Q);
var $=Object.defineProperty;var Nt=Object.getOwnPropertyDescriptor;var Wt=Object.getOwnPropertyNames;var Ft=Object.prototype.hasOwnProperty;var jt=(t,e)=>{for(var n in e)$(t,n,{get:e[n],enumerable:!0})},Bt=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Wt(e))!Ft.call(t,a)&&a!==n&&$(t,a,{get:()=>e[a],enumerable:!(r=Nt(e,a))||r.enumerable});return t};var Ht=t=>Bt($({},"__esModule",{value:!0}),t);var be={};jt(be,{connect:()=>gt,machine:()=>Vt});module.exports=Ht(be);var V=t=>t?"":void 0;var et=new WeakMap;function _t(t){var e;if(!t)return{};let n=et.get(t);return n||(n=((e=t?.ownerDocument.defaultView)!=null?e:window).getComputedStyle(t),et.set(t,n)),n}function L(t){let e=new Set;function n(r){let a=globalThis.requestAnimationFrame(r);e.add(()=>globalThis.cancelAnimationFrame(a))}return n(()=>n(t)),function(){e.forEach(function(r){r()})}}var we=(()=>{let t=0;return()=>(t++,t.toString(36))})();function it(t){return typeof t=="object"&&t?.nodeType===Node.ELEMENT_NODE&&typeof t?.nodeName=="string"}var zt=t=>t?.getAttribute("disabled")!=null||!!(t!=null&&t.getAttribute("aria-disabled"));var rt=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","embed","iframe","object","a[href]","area[href]","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","[contenteditable]:not([contenteditable=false])","details > summary:first-of-type"].join(",");function ot(t,e){let n=_t(t);if(!t||n.getPropertyValue("visibility")==="hidden")return!0;for(;t;){if(e!=null&&t===e)return!1;if(n.getPropertyValue("display")==="none")return!0;t=t.parentElement}return!1}var st=(t,e=!1)=>{if(!t)return[];let n=Array.from(t.querySelectorAll(rt));return e&&it(t)&&n.unshift(t),n.filter(r=>Kt(r)&&!ot(r))},Kt=t=>!it(t)||ot(t)||zt(t)?!1:t?.matches(rt);var nt={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft",Home:"End",End:"Home"},$t={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"};function at(t,e={}){var n;let{dir:r="ltr",orientation:a="horizontal"}=e,{key:u}=t;return u=(n=$t[u])!=null?n:u,r==="rtl"&&a==="horizontal"&&u in nt&&(u=nt[u]),u}function lt(t,e){var n;return Array.from((n=t?.querySelectorAll(e))!=null?n:[])}function q(t,e){return t.find(n=>n.id===e)}function ut(t,e){let n=q(t,e);return n?t.indexOf(n):-1}function ct(t,e,n=!0){let r=ut(t,e);return r=n?(r+1)%t.length:Math.min(r+1,t.length-1),t[r]}function dt(t,e,n=!0){let r=ut(t,e);return r===-1?n?t[t.length-1]:null:(r=n?(r-1+t.length)%t.length:Math.max(0,r-1),t[r])}function qt(t){return{button:t,label:t,input:t,output:t,element:t}}var ht=qt(t=>t);var ft=t=>t[0],pt=t=>t[t.length-1];var Te=(()=>{let t=0;return()=>(t++,t.toString(36))})();var Ut=t=>Gt()&&t.test(navigator.userAgent);var Gt=()=>typeof window<"u";var vt=()=>Ut(/^((?!chrome|android).)*safari/i);var p={getDoc:t=>{var e;return(e=t.doc)!=null?e:document},getRootId:t=>{var e,n;return(n=(e=t.ids)==null?void 0:e.root)!=null?n:`tabs-${t.uid}`},getTriggerGroupId:t=>{var e,n;return(n=(e=t.ids)==null?void 0:e.triggerGroup)!=null?n:`tabs-${t.uid}-trigger-group`},getContentId:(t,e)=>{var n,r;return(r=(n=t.ids)==null?void 0:n.content)!=null?r:`tabs-${t.uid}-content-${e}`},getContentGroupId:t=>{var e,n;return(n=(e=t.ids)==null?void 0:e.contentGroup)!=null?n:`tabs-${t.uid}-content-group`},getTriggerId:(t,e)=>{var n,r;return(r=(n=t.ids)==null?void 0:n.trigger)!=null?r:`tabs-${t.uid}-trigger-${e}`},getIndicatorId:t=>`tabs-${t.uid}-indicator`,getTriggerGroupEl:t=>p.getDoc(t).getElementById(p.getTriggerGroupId(t)),getContentEl:(t,e)=>p.getDoc(t).getElementById(p.getContentId(t,e)),getTriggerEl:(t,e)=>p.getDoc(t).getElementById(p.getTriggerId(t,e)),getIndicatorEl:t=>p.getDoc(t).getElementById(p.getIndicatorId(t)),getElements:t=>{let n=`[role=tab][data-ownedby='${CSS.escape(p.getTriggerGroupId(t))}']:not([disabled])`;return lt(p.getTriggerGroupEl(t),n)},getFirstEl:t=>ft(p.getElements(t)),getLastEl:t=>pt(p.getElements(t)),getNextEl:(t,e)=>ct(p.getElements(t),p.getTriggerId(t,e),t.loop),getPrevEl:(t,e)=>dt(p.getElements(t),p.getTriggerId(t,e),t.loop),getRectById:(t,e)=>{var a;let n={offsetLeft:0,offsetTop:0,offsetWidth:0,offsetHeight:0},r=(a=q(p.getElements(t),p.getTriggerId(t,e)))!=null?a:n;return t.isVertical?{top:`${r.offsetTop}px`,height:`${r.offsetHeight}px`}:{left:`${r.offsetLeft}px`,width:`${r.offsetWidth}px`}},getActiveContentEl:t=>{if(!t.value)return;let e=p.getContentId(t,t.value);return p.getDoc(t).getElementById(e)}};function gt(t,e,n=ht){let r=t.context.messages,a=t.matches("focused");return{value:t.context.value,focusedValue:t.context.focusedValue,previousValues:Array.from(t.context.previousValues),setValue(u){e({type:"SET_VALUE",value:u})},rootProps:n.element({"data-part":"root",id:p.getRootId(t.context),"data-orientation":t.context.orientation,"data-focus":V(a),dir:t.context.dir}),triggerGroupProps:n.element({"data-part":"trigger-group",id:p.getTriggerGroupId(t.context),role:"tablist","data-focus":V(a),"aria-orientation":t.context.orientation,"data-orientation":t.context.orientation,"aria-label":r.tablistLabel,onKeyDown(u){let g={ArrowDown(){e("ARROW_DOWN")},ArrowUp(){e("ARROW_UP")},ArrowLeft(){e("ARROW_LEFT")},ArrowRight(){e("ARROW_RIGHT")},Home(){e("HOME")},End(){e("END")},Enter(){e({type:"ENTER",value:t.context.focusedValue})}},m=at(u,t.context),y=g[m];y&&(u.preventDefault(),y(u))}}),getTriggerProps(u){let{value:g,disabled:m}=u,y=t.context.value===g;return n.button({"data-part":"trigger",role:"tab",type:"button",disabled:m,"data-orientation":t.context.orientation,"data-disabled":V(m),"aria-disabled":m,"data-value":g,"aria-selected":y,"data-selected":V(y),"aria-controls":p.getContentId(t.context,g),"data-ownedby":p.getTriggerGroupId(t.context),id:p.getTriggerId(t.context,g),tabIndex:y?0:-1,onFocus(){e({type:"TAB_FOCUS",value:g})},onBlur(b){let E=b.relatedTarget;(E==null?void 0:E.getAttribute("role"))!=="tab"&&e({type:"TAB_BLUR"})},onClick(b){m||(vt()&&b.currentTarget.focus(),e({type:"TAB_CLICK",value:g}))}})},contentGroupProps:n.element({"data-part":"content-group",id:p.getContentGroupId(t.context),"data-orientation":t.context.orientation}),getContentProps({value:u}){let g=t.context.value===u;return n.element({"data-part":"content",id:p.getContentId(t.context,u),tabIndex:0,"aria-labelledby":p.getTriggerId(t.context,u),role:"tabpanel","data-ownedby":p.getTriggerGroupId(t.context),hidden:!g})},getDeleteButtonProps({value:u,disabled:g}){var m;return n.button({"data-part":"delete-button",type:"button",tabIndex:-1,"aria-label":(m=r.deleteLabel)==null?void 0:m.call(r,u),disabled:g,onClick(){e({type:"DELETE",value:u})}})},indicatorProps:n.element({id:p.getIndicatorId(t.context),"data-part":"indicator","data-orientation":t.context.orientation,style:{"--transition-duration":"200ms","--transition-property":"left, right, top, bottom, width, height",position:"absolute",willChange:"var(--transition-property)",transitionProperty:"var(--transition-property)",transitionDuration:t.context.hasMeasuredRect?"var(--transition-duration)":"0ms",transitionTimingFunction:"var(--transition-timing-function)",...t.context.indicatorRect}})}}var K={},We=Symbol(),Fe=Symbol(),Yt=Symbol(),mt=Object.getPrototypeOf,X=new WeakMap,Xt=t=>t&&(X.has(t)?X.get(t):mt(t)===Object.prototype||mt(t)===Array.prototype),Jt=t=>Xt(t)&&t[Yt]||null,yt=(t,e=!0)=>{X.set(t,e)},Lt=Symbol(),A=Symbol(),H=Symbol(),Zt=Symbol(),D=Symbol(),bt=Symbol(),Z=new WeakSet;function _(t){return Z.add(t),t}var z=t=>typeof t=="object"&&t!==null,Qt=t=>z(t)&&!Z.has(t)&&(Array.isArray(t)||!(Symbol.iterator in t))&&!(t instanceof WeakMap)&&!(t instanceof WeakSet)&&!(t instanceof Error)&&!(t instanceof Number)&&!(t instanceof Date)&&!(t instanceof String)&&!(t instanceof RegExp)&&!(t instanceof ArrayBuffer),Et=new WeakMap,wt=1,xt=new WeakMap;function Q(t={}){if(!z(t))throw new Error("object required");let e=Et.get(t);if(e)return e;let n=wt,r=new Set,a=(f,h=++wt)=>{n!==h&&(n=h,r.forEach(i=>i(f,h)))},u=new Map,g=f=>{let h=u.get(f);return h||(h=(i,o)=>{let s=[...i];s[1]=[f,...s[1]],a(s,o)},u.set(f,h)),h},m=f=>{let h=u.get(f);return u.delete(f),h},y=(f,h)=>{let i=xt.get(h);if(i?.[0]===n)return i[1];let o=Array.isArray(f)?[]:Object.create(Object.getPrototypeOf(f));return yt(o,!0),xt.set(h,[n,o]),Reflect.ownKeys(f).forEach(s=>{let l=Reflect.get(f,s,h);if(Z.has(l))yt(l,!1),o[s]=l;else if(l instanceof Promise)if(D in l)o[s]=l[D];else{let d=l[bt]||l;Object.defineProperty(o,s,{get(){if(D in l)return l[D];throw d}})}else l?.[A]?o[s]=l[H]:o[s]=l}),Object.freeze(o),o},b=Array.isArray(t)?[]:Object.create(Object.getPrototypeOf(t)),E={get(f,h,i){return h===Lt?n:h===A?r:h===H?y(f,i):h===Zt?E:Reflect.get(f,h,i)},deleteProperty(f,h){let i=Reflect.get(f,h),o=i?.[A];o&&o.delete(m(h));let s=Reflect.deleteProperty(f,h);return s&&a(["delete",[h],i]),s},is:Object.is,canProxy:Qt,set(f,h,i,o){var s;let l=Reflect.get(f,h,o);if(this.is(l,i))return!0;let d=l?.[A];d&&d.delete(m(h)),z(i)&&(i=Jt(i)||i);let c;return(s=Object.getOwnPropertyDescriptor(f,h))!=null&&s.set?c=i:i instanceof Promise?c=i.then(v=>(c[D]=v,a(["resolve",[h],v]),v)).catch(v=>{c[bt]=v,a(["reject",[h],v])}):i?.[A]?(c=i,c[A].add(g(h))):this.canProxy(i)?(c=Q(i),c[A].add(g(h))):c=i,Reflect.set(f,h,c,o),a(["set",[h],i,l]),!0}},T=new Proxy(b,E);return Et.set(t,T),Reflect.ownKeys(t).forEach(f=>{let h=Object.getOwnPropertyDescriptor(t,f);h.get||h.set?Object.defineProperty(b,f,h):T[f]=t[f]}),T}function St(t){return z(t)?t[Lt]:void 0}function tt(t,e,n){(K.env&&K.env.MODE)!=="production"&&!t?.[A]&&console.warn("Please use proxy object");let r,a=[],u=g=>{if(a.push(g),n){e(a.splice(0));return}r||(r=Promise.resolve().then(()=>{r=void 0,e(a.splice(0))}))};return t[A].add(u),()=>{t[A].delete(u)}}function te(t){return(K.env&&K.env.MODE)!=="production"&&!t?.[H]&&console.warn("Please use proxy object"),t[H]}function ee(t){for(;t.length>0;)t.pop();return t}var Tt=(t,...e)=>(typeof t=="function"?t(...e):t)??void 0,C=t=>t,At=()=>{};var ne=(()=>{let t=0;return()=>(t++,t.toString(36))})(),M=t=>Array.isArray(t),W=t=>!(t==null||typeof t!="object"||M(t)),ie=t=>typeof t=="number"&&!Number.isNaN(t),S=t=>typeof t=="string",P=t=>typeof t=="function";function U(...t){let e=t.length===1?t[0]:t[1],n=t.length===2?t[0]:!0}function G(...t){let e=t.length===1?t[0]:t[1],n=t.length===2?t[0]:!0}function re(t){return W(t)&&t.predicate!=null}function Y(t,e){return(n,r)=>re(t)?t.predicate(e??{})(n,r):t}function oe(...t){return{predicate:e=>(n,r)=>t.map(a=>{var u;return S(a)?!!((u=e[a])!=null&&u.call(e,n,r)):P(a)?a(n,r):a.predicate(e)(n,r)}).some(Boolean)}}function se(...t){return{predicate:e=>(n,r)=>t.map(a=>{var u;return S(a)?!!((u=e[a])!=null&&u.call(e,n,r)):P(a)?a(n,r):a.predicate(e)(n,r)}).every(Boolean)}}function ae(t){return{predicate:e=>(n,r)=>{var a;return S(t)?!((a=e[t])!=null&&a.call(e,n,r)):P(t)?!t(n,r):!t.predicate(e)(n,r)}}}var kt={or:oe,and:se,not:ae};function le(t){return W(t)&&t.predicate!=null}var ue=()=>!0;function It(t,e){return t=t??ue,(n,r)=>{if(S(t)){let a=e?.[t];return P(a)?a(n,r):a}return le(t)?t.predicate(e??{})(n,r):t?.(n,r)}}function N(t){var e,n,r;if(Array.isArray(t)){for(n=Array(e=t.length);e--;)n[e]=(r=t[e])&&typeof r=="object"?N(r):r;return n}if(Object.prototype.toString.call(t)==="[object Object]"){n={};for(e in t)e==="__proto__"?Object.defineProperty(n,e,{value:N(t[e]),configurable:!0,enumerable:!0,writable:!0}):n[e]=(r=t[e])&&typeof r=="object"?N(r):r;return n}return t}function Ct(t,e,n,r){return tt(t,a=>{a.some(u=>u[1][0]===e)&&n(t[e])},r)}var je=Symbol(),I=new WeakMap,F=new WeakMap,Mt=(t,e)=>{let n=I.get(t);n&&(n[0].forEach(r=>{let{d:a}=r;t!==a&&Mt(a)}),++n[2],e&&n[3].add(e))},ce=(t,e)=>{let n=I.get(t);return n?.[2]?(n[3].add(e),!0):!1},J=t=>{let e=I.get(t);e&&(--e[2],e[2]||(e[3].forEach(n=>n()),e[3].clear()),e[0].forEach(n=>{let{d:r}=n;t!==r&&J(r)}))},de=t=>{let{s:e,d:n}=t,r=F.get(n);r||(r=[new Set],F.set(t.d,r)),r[0].add(t);let a=I.get(e);if(!a){let u=new Set,g=tt(e,m=>{u.forEach(y=>{let{d:b,c:E,n:T,i:f}=y;e===b&&m.every(h=>h[1].length===1&&f.includes(h[1][0]))||y.p||(Mt(e,E),T?J(e):y.p=Promise.resolve().then(()=>{delete y.p,J(e)}))})},!0);a=[u,g,0,new Set],I.set(e,a)}a[0].add(t)},Pt=t=>{let{s:e,d:n}=t,r=F.get(n);r?.[0].delete(t),r?.[0].size===0&&F.delete(n);let a=I.get(e);if(a){let[u,g]=a;u.delete(t),u.size||(g(),I.delete(e))}},he=t=>{let e=F.get(t);return e?Array.from(e[0]):[]};function fe(t,e){let n=e?.proxy||Q({}),r=!!e?.sync,a=Object.keys(t);return a.forEach(u=>{if(Object.getOwnPropertyDescriptor(n,u))throw new Error("object property already defined");let g=t[u],m=null,y=()=>{if(m&&(Array.from(m).map(([f])=>ce(f,y)).some(f=>f)||Array.from(m).every(([f,h])=>St(f)===h.v)))return;let b=new Map,E=g(f=>(b.set(f,{v:St(f)}),f)),T=()=>{b.forEach((f,h)=>{var i;let o=(i=m?.get(h))==null?void 0:i.s;if(o)f.s=o;else{let s={s:h,d:n,k:u,c:y,n:r,i:a};de(s),f.s=s}}),m?.forEach((f,h)=>{!b.has(h)&&f.s&&Pt(f.s)}),m=b};E instanceof Promise?E.finally(T):T(),n[u]=E};y()}),n}function pe(t,e){let n=e?.delete?new Set:null;he(t).forEach(r=>{let{k:a}=r;(!e?.keys||e.keys.includes(a))&&(Pt(r),n&&n.add(a))}),n&&n.forEach(r=>{delete t[r]})}function ve(t){var e;let n=Q({value:"",previousValue:"",event:C({}),context:(e=t.context)!=null?e:C({}),done:!1,tags:[],hasTag(r){return this.tags.includes(r)},matches(...r){return r.includes(this.value)},can(r){return C(this).nextEvents.includes(r)},get nextEvents(){var r,a,u,g;let m=(u=(a=(r=t.states)==null?void 0:r[this.value])==null?void 0:a.on)!=null?u:{},y=(g=t?.on)!=null?g:{};return Object.keys({...m,...y})},get changed(){return this.event.value==="machine.init"||!this.previousValue?!1:this.value!==this.previousValue}});return C(n)}function j(t,e){return(n,r)=>{if(ie(t))return t;if(P(t))return t(n,r);if(S(t)){let a=Number.parseFloat(t);if(!Number.isNaN(a))return a;if(e){let u=e?.[t];if(u==null){let g=`[machine] Cannot determine delay for ${t}. It doesn't exist in options.delays`;throw new Error(g)}return P(u)?u(n,r):u}}}}function x(t){return S(t)?{type:t}:t}function k(t){return t?M(t)?t:[t]:[]}function Ot(t){return S(t)?{target:t}:t}function ge(t,e){return(n,r)=>k(t).map(Ot).find(a=>{var u;let g=It(a.guard,e)(n,r);return(u=g??a.target)!=null?u:a.actions})}function me(t,e){let n=S(t)?Ot(t):t,r=a=>(a.actions&&!a.target&&e&&(a.target=e),a);if(M(n))return n.map(r);if(W(n))return r(C(n))}var B=class{constructor(t,e){this.config=t,this.status="Not Started",this.type="machine",this.activityEvents=new Map,this.delayedEvents=new Map,this.stateListeners=new Set,this.eventListeners=new Set,this.doneListeners=new Set,this.contextWatchers=new Set,this.removeStateListener=At,this.removeEventListener=At,this.children=new Map,this.start=i=>{if(this.status==="Running")return this;this.status="Running";let o=x("machine.init");if(i){let d=W(i)?i:{context:this.config.context,value:i};this.setState(d.value),this.setContext(d.context)}let s={target:i?void 0:this.config.initial},l=this.getNextStateInfo(s,o);return l.target=C(l.target||s.target),this.initialState=l,this.performStateChangeEffects(l.target,l,o),this.removeStateListener=tt(this.state,()=>{this.stateListeners.forEach(d=>{d(this.stateSnapshot)})},this.sync),this.removeEventListener=Ct(this.state,"event",d=>{this.config.onEvent&&this.executeActions(this.config.onEvent,d);for(let c of this.eventListeners)c(d)}),this.setupContextWatchers(),this.executeActivities(x("machine.start"),k(this.config.activities),"machine.start"),this.executeActions(this.config.entry,x("machine.start")),this},this.setupContextWatchers=()=>{var i;for(let[o,s]of Object.entries((i=this.config.watch)!=null?i:{}))this.contextWatchers.add(Ct(this.state.context,o,()=>{this.executeActions(s,this.state.event)}))},this.setupComputed=()=>{var i;let o=C((i=this.config.computed)!=null?i:{}),s=Object.fromEntries(Object.entries(o).map(([l,d])=>[l,c=>d(c(this.state.context))]));fe(s,{proxy:this.state.context})},this.detachComputed=()=>{pe(this.state.context,{delete:!0})},this.stop=()=>{if(this.status!=="Stopped")return this.setState(null),this.setEvent("machine.stop"),this.config.context&&this.setContext(this.config.context),this.stopStateListeners(),this.stopChildren(),this.stopActivities(),this.stopDelayedEvents(),this.stopContextWatchers(),this.stopEventListeners(),this.detachComputed(),this.status="Stopped",this.executeActions(this.config.exit,x("machine.stop")),this},this.stopEventListeners=()=>{this.eventListeners.clear(),this.removeEventListener()},this.stopStateListeners=()=>{this.removeStateListener(),this.stateListeners.clear()},this.stopContextWatchers=()=>{this.contextWatchers.forEach(i=>i()),this.contextWatchers.clear()},this.stopDelayedEvents=()=>{this.delayedEvents.forEach(i=>{i.forEach(o=>o())}),this.delayedEvents.clear()},this.stopActivities=i=>{var o,s;i?((o=this.activityEvents.get(i))==null||o.forEach(l=>l()),(s=this.activityEvents.get(i))==null||s.clear(),this.activityEvents.delete(i)):(this.activityEvents.forEach(l=>{l.forEach(d=>d()),l.clear()}),this.activityEvents.clear())},this.sendChild=(i,o)=>{let s=x(i),l=Tt(o,this.contextSnapshot),d=this.children.get(l);d||G(`[machine/send-child] Cannot send '${s.type}' event to unknown child`),d.send(s)},this.stopChild=i=>{this.children.has(i)||G("[machine/stop-child] Cannot stop unknown child"),this.children.get(i).stop(),this.children.delete(i)},this.removeChild=i=>{this.children.delete(i)},this.stopChildren=()=>{this.children.forEach(i=>i.stop()),this.children.clear()},this.setParent=i=>{this.parent=i},this.spawn=(i,o)=>{let s=Tt(i);return o&&(s.id=o),s.type="machine.actor",s.setParent(this),this.children.set(s.id,C(s)),s.onDone(()=>{this.removeChild(s.id)}).start(),C(_(s))},this.addActivityCleanup=(i,o)=>{var s;!i||(this.activityEvents.has(i)?(s=this.activityEvents.get(i))==null||s.add(o):this.activityEvents.set(i,new Set([o])))},this.setState=i=>{this.state.previousValue=this.state.value,this.state.value=i;let o=this.getStateNode(i);i==null?ee(this.state.tags):this.state.tags=k(o?.tags)},this.setContext=i=>{for(let o in i)this.state.context[o]=i[o]},this.withContext=i=>{this.detachComputed();let o={...this.config.context,...i};return new B({...this.config,context:o},this.options)},this.withOptions=i=>(this.detachComputed(),new B(this.config,{...this.options,...i})),this.setActions=i=>{this.actionMap={...this.actionMap,...i}},this.clone=()=>(this.detachComputed(),new B(this.config,this.options)),this.getStateNode=i=>{var o;if(i)return(o=this.config.states)==null?void 0:o[i]},this.getNextStateInfo=(i,o)=>{var s;let l=this.determineTransition(i,o),d=(s=l?.target)!=null?s:this.state.value,c=this.getStateNode(d);return{transition:l,stateNode:c,target:d}},this.getActionFromDelayedTransition=i=>{let o=x("machine.after"),s=j(i.delay,this.delayMap)(this.contextSnapshot,o),l;return{entry:()=>{l=globalThis.setTimeout(()=>{let d=this.state.value,c=this.getNextStateInfo(i,o);this.performStateChangeEffects(d,c,o)},s)},exit:()=>{globalThis.clearTimeout(l)}}},this.getDelayedEventActions=i=>{let o=this.getStateNode(i),s=x("machine.after");if(!o||!o.after)return;let l=[],d=[];if(M(o.after)){let c=this.determineTransition(o.after,s);if(!c)return;let v=this.getActionFromDelayedTransition(c);l.push(v.entry),d.push(v.exit)}else if(W(o.after))for(let c in o.after){let v=o.after[c],w={};if(M(v)){let R=this.determineTransition(v,s);R&&(w=R)}else S(v)?w={target:v,delay:c}:w={...v,delay:c};let O=this.getActionFromDelayedTransition(w);l.push(O.entry),d.push(O.exit)}return{entries:l,exits:d}},this.executeActions=(i,o)=>{var s;let l=Y(i,this.guardMap)(this.contextSnapshot,o);for(let d of k(l)){let c=S(d)?(s=this.actionMap)==null?void 0:s[d]:d;U(S(d)&&!c,`[machine/exec-action] No implementation found for action: \`${d}\``),c?.(this.state.context,o,this.meta)}},this.executeActivities=(i,o,s)=>{var l;for(let d of o){let c=S(d)?(l=this.activityMap)==null?void 0:l[d]:d;if(!c){U(`[machine/exec-activity] No implementation found for activity: \`${d}\``);continue}let v=c(this.state.context,i,this.meta);v&&this.addActivityCleanup(s??this.state.value,v)}},this.createEveryActivities=(i,o)=>{if(!i)return;let s=x("machine.every");if(M(i)){let l=k(i).find(c=>{let v=j(c.delay,this.delayMap);c.delay=v(this.contextSnapshot,s);let w=It(c.guard,this.guardMap)(this.contextSnapshot,s);return w??c.delay});if(!l)return;let d=j(l.delay,this.delayMap)(this.contextSnapshot,s);o(()=>{let c=globalThis.setInterval(()=>{this.executeActions(l.actions,s)},d);return()=>{globalThis.clearInterval(c)}})}else for(let l in i){let d=i?.[l],c=j(l,this.delayMap)(this.contextSnapshot,s);o(()=>{let v=globalThis.setInterval(()=>{this.executeActions(d,s)},c);return()=>{globalThis.clearInterval(v)}})}},this.setEvent=i=>{this.state.event=_(x(i))},this.performExitEffects=(i,o)=>{let s=this.state.value,l=i?this.getStateNode(i):void 0;this.stopActivities(s);let d=Y(l?.exit,this.guardMap)(this.contextSnapshot,o),c=k(d),v=this.delayedEvents.get(s);v&&c.push(...v),this.executeActions(c,o),this.eventListeners.clear()},this.performEntryEffects=(i,o)=>{let s=this.getStateNode(i),l=k(s?.activities);this.createEveryActivities(s?.every,w=>{l.unshift(w)}),l.length>0&&this.executeActivities(o,l);let d=Y(s?.entry,this.guardMap)(this.contextSnapshot,o),c=k(d),v=this.getDelayedEventActions(i);s?.after&&v&&(this.delayedEvents.set(i,v?.exits),c.push(...v.entries)),this.executeActions(c,o),s?.type==="final"&&(this.state.done=!0,this.doneListeners.forEach(w=>{w(this.stateSnapshot)}),this.stop())},this.performTransitionEffects=(i,o)=>{let s=this.determineTransition(i,o);this.executeActions(s?.actions,o)},this.performStateChangeEffects=(i,o,s)=>{var l,d;this.setEvent(s),o.target=(d=(l=o.target)!=null?l:this.state.value)!=null?d:void 0;let c=o.target&&o.target!==this.state.value;c&&this.performExitEffects(i,s),this.performTransitionEffects(o?.transition,s),this.setState(o.target),c&&this.performEntryEffects(o.target,s)},this.determineTransition=(i,o)=>{let s=ge(i,this.guardMap);return s?.(this.contextSnapshot,o)},this.sendParent=i=>{var o;this.parent||G("[machine/send-parent] Cannot send event to an unknown parent");let s=x(i);(o=this.parent)==null||o.send(s)},this.send=i=>{let o=x(i);this.transition(this.state.value,o)},this.transition=(i,o)=>{var s,l,d;let c=S(i)?this.getStateNode(i):i?.stateNode,v=x(o);if(!c&&!this.config.on){let Dt=this.status==="Stopped"?"[machine/transition] Cannot transition a stopped machine":"[machine/transition] State does not have a definition";U(Dt);return}let w=(d=(s=c?.on)==null?void 0:s[v.type])!=null?d:(l=this.config.on)==null?void 0:l[v.type],O=me(w,this.state.value);if(!O)return;let R=this.getNextStateInfo(O,v);return this.performStateChangeEffects(this.state.value,R,v),R.stateNode},this.subscribe=i=>(this.stateListeners.add(i),this.status==="Running"&&i(this.stateSnapshot),()=>{this.stateListeners.delete(i)}),this.onDone=i=>(this.doneListeners.add(i),this),this.onTransition=i=>(this.stateListeners.add(i),this.status==="Running"&&i(this.stateSnapshot),this),this.onEvent=i=>(i(this.state.event),this.eventListeners.add(i),this);var n,r,a,u,g,m,y,b,E,T,f;this.options=N(e),this.id=(n=t.id)!=null?n:`machine-${ne()}`,this.guardMap=(a=(r=this.options)==null?void 0:r.guards)!=null?a:{},this.actionMap=(g=(u=this.options)==null?void 0:u.actions)!=null?g:{},this.delayMap=(y=(m=this.options)==null?void 0:m.delays)!=null?y:{},this.activityMap=(E=(b=this.options)==null?void 0:b.activities)!=null?E:{},this.sync=(f=(T=this.options)==null?void 0:T.sync)!=null?f:!1,this.state=ve(N(t)),this.setupComputed();let h=x("machine.created");this.executeActions(t?.created,h)}get stateSnapshot(){return C(te(this.state))}get contextSnapshot(){return this.stateSnapshot.context}get self(){let t=this;return{id:this.id,send:this.send.bind(this),sendParent:this.sendParent.bind(this),sendChild:this.sendChild.bind(this),stop:this.stop.bind(this),stopChild:this.stopChild.bind(this),spawn:this.spawn.bind(this),get state(){return t.stateSnapshot}}}get meta(){return{state:this.stateSnapshot,guards:this.guardMap,send:this.send.bind(this),listen:this.onEvent.bind(this),self:this.self,getState:()=>this.stateSnapshot}}},Rt=(t,e)=>new B(t,e);var{not:ye}=kt,Vt=Rt({initial:"unknown",context:{dir:"ltr",orientation:"horizontal",activationMode:"automatic",value:null,focusedValue:null,uid:"",previousValues:[],indicatorRect:{left:"0px",top:"0px",width:"0px",height:"0px"},hasMeasuredRect:!1,isIndicatorRendered:!1,loop:!0,messages:{}},computed:{isHorizontal:t=>t.orientation==="horizontal",isVertical:t=>t.orientation==="vertical"},created:["setPrevSelectedTabs"],watch:{focusedValue:"invokeOnFocus",value:["invokeOnChange","setPrevSelectedTabs","setIndicatorRect","setContentTabIndex"],dir:["clearMeasured","setIndicatorRect"]},on:{SET_VALUE:{actions:"setValue"},DELETE:{actions:"deleteValue"}},states:{unknown:{on:{SETUP:{target:"idle",actions:["setupDocument","checkRenderedElements","setIndicatorRect","setContentTabIndex"]}}},idle:{on:{TAB_FOCUS:{guard:"selectOnFocus",target:"focused",actions:["setFocusedValue","setValue"]},TAB_CLICK:{target:"focused",actions:["setFocusedValue","setValue"]}}},focused:{on:{TAB_CLICK:{target:"focused",actions:["setFocusedValue","setValue"]},ARROW_LEFT:{guard:"isHorizontal",actions:"focusPrevTab"},ARROW_RIGHT:{guard:"isHorizontal",actions:"focusNextTab"},ARROW_UP:{guard:"isVertical",actions:"focusPrevTab"},ARROW_DOWN:{guard:"isVertical",actions:"focusNextTab"},HOME:{actions:"focusFirstTab"},END:{actions:"focusLastTab"},ENTER:{guard:ye("selectOnFocus"),actions:"setValue"},TAB_FOCUS:[{guard:"selectOnFocus",actions:["setFocusedValue","setValue"]},{actions:"setFocusedValue"}],TAB_BLUR:{target:"idle",actions:"clearFocusedValue"}}}}},{guards:{isVertical:t=>t.isVertical,isHorizontal:t=>t.isHorizontal,selectOnFocus:t=>t.activationMode==="automatic"},actions:{setupDocument(t,e){t.uid=e.id,e.doc&&(t.doc=_(e.doc))},setFocusedValue(t,e){t.focusedValue=e.value},clearFocusedValue(t){t.focusedValue=null},setValue(t,e){t.value=e.value},invokeOnDelete(t,e){var n;(n=t.onDelete)==null||n.call(t,{value:e.value})},focusFirstTab(t){L(()=>{var e;return(e=p.getFirstEl(t))==null?void 0:e.focus()})},focusLastTab(t){L(()=>{var e;return(e=p.getLastEl(t))==null?void 0:e.focus()})},focusNextTab(t){if(!t.focusedValue)return;let e=p.getNextEl(t,t.focusedValue);L(()=>e==null?void 0:e.focus())},focusPrevTab(t){if(!t.focusedValue)return;let e=p.getPrevEl(t,t.focusedValue);L(()=>e==null?void 0:e.focus())},setIndicatorRect(t){L(()=>{!t.isIndicatorRendered||!t.value||(t.indicatorRect=p.getRectById(t,t.value),!t.hasMeasuredRect&&L(()=>{t.hasMeasuredRect=!0}))})},checkRenderedElements(t){L(()=>{t.isIndicatorRendered=!!p.getIndicatorEl(t)})},clearMeasured(t){t.hasMeasuredRect=!1},invokeOnChange(t){var e;(e=t.onChange)==null||e.call(t,{value:t.value})},invokeOnFocus(t){var e;(e=t.onFocus)==null||e.call(t,{value:t.focusedValue})},setPrevSelectedTabs(t){if(t.value!=null){let e=Array.from(t.previousValues).concat(t.value);t.previousValues=Array.from(new Set(e))}},setContentTabIndex(t){L(()=>{let e=p.getActiveContentEl(t);if(!e)return;st(e).length>0?e.removeAttribute("tabindex"):e.setAttribute("tabindex","0")})}}});
//# sourceMappingURL=index.js.map
{
"name": "@zag-js/tabs",
"version": "0.0.0-dev-20220412162814",
"version": "0.0.0-dev-20220412212252",
"description": "Core logic for the tabs widget implemented as a state machine",

@@ -15,3 +15,3 @@ "keywords": [

"author": "Segun Adebayo <sage@adebayosegun.com>",
"homepage": "https://github.com/chakra-ui/ui-machines#readme",
"homepage": "https://github.com/chakra-ui/zag#readme",
"license": "MIT",

@@ -21,3 +21,3 @@ "main": "dist/index.js",

"module": "dist/index.mjs",
"repository": "https://github.com/chakra-ui/ui-machines/tree/main/packages/tabs",
"repository": "https://github.com/chakra-ui/zag/tree/main/packages/tabs",
"sideEffects": false,

@@ -31,10 +31,10 @@ "files": [

"bugs": {
"url": "https://github.com/chakra-ui/ui-machines/issues"
"url": "https://github.com/chakra-ui/zag/issues"
},
"dependencies": {
"@zag-js/core": "^0.0.0-dev-20220412162814",
"@zag-js/dom-utils": "^0.0.0-dev-20220412162814",
"@zag-js/types": "^0.0.0-dev-20220412162814",
"@zag-js/utils": "^0.0.0-dev-20220412162814"
"@zag-js/core": "^0.0.0-dev-20220412212252",
"@zag-js/dom-utils": "^0.0.0-dev-20220412212252",
"@zag-js/types": "^0.0.0-dev-20220412212252",
"@zag-js/utils": "^0.0.0-dev-20220412212252"
}
}

@@ -15,8 +15,6 @@ # @zag-js/tabs

Yes please! See the [contributing guidelines](https://github.com/chakra-ui/ui-machines/blob/main/CONTRIBUTING.md) for
details.
Yes please! See the [contributing guidelines](https://github.com/chakra-ui/zag/blob/main/CONTRIBUTING.md) for details.
## Licence
This project is licensed under the terms of the
[MIT license](https://github.com/chakra-ui/ui-machines/blob/main/LICENSE).
This project is licensed under the terms of the [MIT license](https://github.com/chakra-ui/zag/blob/main/LICENSE).

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc