@womp/kookie-ui 0.27.0 → 0.28.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/components.css +25 -24
- package/dist/cjs/components/_internal/pane-chrome.d.ts +6 -0
- package/dist/cjs/components/_internal/pane-chrome.d.ts.map +1 -1
- package/dist/cjs/components/_internal/pane-chrome.js +1 -1
- package/dist/cjs/components/_internal/pane-chrome.js.map +3 -3
- package/dist/cjs/components/_internal/shell-sidebar.js +1 -1
- package/dist/cjs/components/_internal/shell-sidebar.js.map +3 -3
- package/dist/cjs/components/index.js +2 -2
- package/dist/cjs/components/index.js.map +3 -3
- package/dist/cjs/components/shell.js +1 -1
- package/dist/cjs/components/shell.js.map +3 -3
- package/dist/cjs/components/sidebar.js +1 -1
- package/dist/cjs/components/sidebar.js.map +3 -3
- package/dist/cjs/components/toolbar.js +1 -1
- package/dist/cjs/components/toolbar.js.map +3 -3
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/index.js.map +3 -3
- package/dist/esm/{chunk-3MFSQ6PN.js → chunk-2FYUM6TA.js} +2 -2
- package/dist/esm/{chunk-6HEORZNJ.js → chunk-4LV37PHM.js} +2 -2
- package/dist/esm/{chunk-H73AMXCH.js → chunk-AS2STDGA.js} +2 -2
- package/dist/esm/{chunk-25ZRMILM.js → chunk-JTMLFTNZ.js} +2 -2
- package/dist/esm/chunk-MJROOEPE.js +3 -0
- package/dist/esm/{chunk-TSWHVZ47.js.map → chunk-MJROOEPE.js.map} +3 -3
- package/dist/esm/components/_internal/pane-chrome.d.ts +6 -0
- package/dist/esm/components/_internal/pane-chrome.d.ts.map +1 -1
- package/dist/esm/components/_internal/pane-chrome.js +1 -1
- package/dist/esm/components/_internal/shell-sidebar.js +1 -1
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/shell.js +1 -1
- package/dist/esm/components/sidebar.js +1 -1
- package/dist/esm/components/toolbar.js +1 -1
- package/dist/esm/index.js +1 -1
- package/package.json +1 -1
- package/src/components/_internal/base-menu.css +4 -4
- package/src/components/_internal/pane-chrome.tsx +8 -2
- package/src/components/message-scroller.css +3 -0
- package/src/styles/tokens/radius.css +66 -25
- package/styles.css +89 -61
- package/tokens/base.css +64 -37
- package/tokens.css +64 -37
- package/dist/esm/chunk-TSWHVZ47.js +0 -3
- /package/dist/esm/{chunk-3MFSQ6PN.js.map → chunk-2FYUM6TA.js.map} +0 -0
- /package/dist/esm/{chunk-6HEORZNJ.js.map → chunk-4LV37PHM.js.map} +0 -0
- /package/dist/esm/{chunk-H73AMXCH.js.map → chunk-AS2STDGA.js.map} +0 -0
- /package/dist/esm/{chunk-25ZRMILM.js.map → chunk-JTMLFTNZ.js.map} +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{a as F}from"./chunk-324VC67W.js";import{a as O,b as U,c as q,e as C,f as $}from"./chunk-67UEMB4K.js";import{a as E}from"./chunk-J54GYD7A.js";import{a as z,b as V,c as j}from"./chunk-MJKVVGGV.js";import{d as H}from"./chunk-GKDGNPBD.js";import{b as L}from"./chunk-5KMEUZWN.js";import{a as W}from"./chunk-QPRUTOLI.js";import{b as y,c as K}from"./chunk-TSWHVZ47.js";import{a as ue}from"./chunk-VQPANPMI.js";var fe={};ue(fe,{Group:()=>oe,GroupContent:()=>ie,GroupLabel:()=>ae,Menu:()=>Y,MenuButton:()=>T,MenuItem:()=>D,MenuSub:()=>ee,MenuSubContent:()=>re,MenuSubTrigger:()=>te,Search:()=>se,Separator:()=>Q});import*as e from"react";import d from"classnames";import*as f from"@radix-ui/react-accordion";var Q=e.forwardRef(({className:t,...r},n)=>e.createElement(F,{...r,ref:n,className:d("kui-SidebarSeparator",t)}));Q.displayName="Sidebar.Separator";var Y=e.forwardRef(({className:t,...r},n)=>e.createElement("ul",{...r,ref:n,className:d("kui-SidebarMenu",t)}));Y.displayName="Sidebar.Menu";var D=e.forwardRef(({className:t,...r},n)=>e.createElement("li",{...r,ref:n,className:d("kui-SidebarMenuItem",t)}));D.displayName="Sidebar.MenuItem";function A(t){if(typeof t=="function"){let r=t;return r.displayName||r.name}if(t&&typeof t=="object"){let r=t;return r.displayName||A(r.render)||A(r.type)}}function ce(t){return t.type==="svg"||t.props?.icon?!0:A(t.type)?.includes("Icon")??!1}function Z(t){return typeof t=="string"||typeof t=="number"}function de(t){let r=e.Children.toArray(t),n=[],o=[];for(let a of r)e.isValidElement(a)&&ce(a)?n.push(a):o.push(Z(a)?e.createElement("span",{key:o.length,className:"kui-SidebarMenuLabel"},a):a);return n.length===0&&r.length>1&&e.isValidElement(r[0])&&(n.push(r[0]),o.shift()),{icons:n,labels:o}}function pe(t){return e.Children.map(t,r=>Z(r)?e.createElement("span",{className:"kui-SidebarMenuLabel"},r):r)}function _(t){if(t.key!=="ArrowDown"&&t.key!=="ArrowUp")return;let r=t.currentTarget.closest(".kui-SidebarContent, .kui-SidebarSearchPopover"),n=r?Array.from(r.querySelectorAll(".kui-SidebarMenuButton")).filter(u=>u.offsetParent!==null):[],o=n.indexOf(t.currentTarget),a=n[o+(t.key==="ArrowDown"?1:-1)];o!==-1&&a&&(t.preventDefault(),a.focus())}var T=e.forwardRef(({asChild:t=!1,isActive:r=!1,shortcut:n,badge:o,className:a,children:u,onKeyDown:p,...s},l)=>{let c=y(),k=e.useContext(K),g=c?.size??k,M=c?.presentation==="thin",N=t?L:"button",P=i=>{p?.(i),i.defaultPrevented||_(i)},m=M?null:e.createElement(e.Fragment,null,o&&e.createElement("div",{className:"kui-SidebarMenuBadge"},typeof o=="string"?e.createElement(E,{size:g,variant:"soft"},o):e.createElement(E,{size:o.size||g,variant:o.variant||"soft",color:o.color,radius:o.radius},o.content)),n&&e.createElement("div",{className:"kui-BaseMenuShortcut kui-SidebarMenuShortcut"},e.createElement(W,{size:g},n))),h=i=>{if(M){let{icons:v,labels:w}=de(i);if(v.length>0)return e.createElement(e.Fragment,null,e.createElement("span",{className:"kui-SidebarMenuIconWrapper"},v),w)}return e.createElement(e.Fragment,null,pe(i),m)},S;return t&&e.isValidElement(u)&&e.Children.count(u)===1?S=e.cloneElement(u,void 0,h(u.props.children)):t?S=u:S=h(u),e.createElement(N,{type:t?void 0:"button",...s,ref:l,"aria-current":r?"page":void 0,className:d("kui-reset","kui-BaseMenuItem","kui-SidebarMenuButton",a),"data-active":r||void 0,onKeyDown:P},S)});T.displayName="Sidebar.MenuButton";var x=e.createContext("accordion"),ee=e.forwardRef(({defaultOpen:t=!1,children:r,...n},o)=>(y()?.presentation==="thin"?"dropdown":"accordion")==="dropdown"?e.createElement("div",{...n,ref:o},e.createElement(O,null,e.createElement(x.Provider,{value:"dropdown"},r))):e.createElement("div",{...n,ref:o},e.createElement(x.Provider,{value:"accordion"},e.createElement(f.Root,{type:"single",collapsible:!0,defaultValue:t?"item":void 0},e.createElement(f.Item,{value:"item"},r)))));ee.displayName="Sidebar.MenuSub";var te=e.forwardRef(({asChild:t=!1,className:r,children:n,onKeyDown:o,...a},u)=>e.useContext(x)==="dropdown"?e.createElement(U,null,e.createElement("button",{...a,onKeyDown:o,ref:u,type:"button","aria-haspopup":"menu",className:d("kui-reset","kui-BaseMenuItem","kui-SidebarMenuButton","kui-SidebarMenuSubTrigger",r)},n)):e.createElement(f.Header,{asChild:!0},e.createElement("div",null,e.createElement(f.Trigger,{...a,onKeyDown:s=>{_(s),o?.(s)},ref:u,asChild:t,className:d("kui-reset","kui-BaseMenuItem","kui-SidebarMenuButton","kui-SidebarMenuSubTrigger",r)},t?n:e.createElement(e.Fragment,null,n,e.createElement(H,{className:d("kui-BaseMenuSubTriggerIcon","kui-SidebarMenuSubTriggerIcon")}))))));te.displayName="Sidebar.MenuSubTrigger";function X(t,r){if(e.isValidElement(t)&&t.type===T){let{asChild:n,isActive:o,shortcut:a,badge:u,type:p,children:s,...l}=t.props,c={...l,"data-active":o||void 0,"aria-current":o?"page":void 0};return n&&e.isValidElement(s)&&e.Children.count(s)===1?e.createElement(C,{key:r,...c,asChild:!0},s):e.createElement(C,{key:r,...c},s)}return e.isValidElement(t)?e.createElement(C,{key:r,asChild:!0},t):e.createElement(C,{key:r},t)}function le(t){return e.Children.map(t,(r,n)=>e.isValidElement(r)&&r.type===T?e.createElement(D,{key:r.key??n},r):r)}var re=e.forwardRef(({className:t,children:r,...n},o)=>{let a=y();if(e.useContext(x)==="dropdown"){let p=e.Children.map(r,(s,l)=>{if(e.isValidElement(s)&&s.type===D){let c=e.Children.toArray(s.props.children);return X(c.length===1?c[0]:c,l)}return X(s,l)});return e.createElement(q,{...n,ref:o,size:a?.size,className:d(t)},e.createElement($,null,p))}return e.createElement(f.Content,{...n,ref:o,className:d("kui-SidebarMenuSubContent",t)},e.createElement("ul",{className:"kui-SidebarMenuSubList"},le(r)))});re.displayName="Sidebar.MenuSubContent";var ne=e.createContext(null),oe=e.forwardRef(({className:t,...r},n)=>{let o=e.useId(),[a,u]=e.useState(null),p=e.useMemo(()=>({labelId:o,setLabelId:u}),[o]);return e.createElement(ne.Provider,{value:p},e.createElement("div",{role:a?"group":void 0,"aria-labelledby":a??void 0,...r,ref:n,className:d("kui-BaseMenuGroup","kui-SidebarGroup",t)}))});oe.displayName="Sidebar.Group";var ae=e.forwardRef(({asChild:t=!1,className:r,id:n,...o},a)=>{let u=t?L:"div",p=e.useContext(ne),s=n??p?.labelId,l=p?.setLabelId;return e.useEffect(()=>{if(!(!l||!s))return l(s),()=>l(null)},[l,s]),e.createElement(u,{...o,id:s,ref:a,className:d("kui-BaseMenuLabel","kui-SidebarGroupLabel",r)})});ae.displayName="Sidebar.GroupLabel";var ie=e.forwardRef(({className:t,...r},n)=>e.createElement("div",{...r,ref:n,className:d("kui-SidebarGroupContent",t)}));ie.displayName="Sidebar.GroupContent";var B=({className:t})=>e.createElement("svg",{className:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},e.createElement("circle",{cx:"11",cy:"11",r:"8"}),e.createElement("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})),J=({className:t})=>e.createElement("svg",{className:t,width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},e.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),se=e.forwardRef(({value:t,onValueChange:r,placeholder:n="Search...",children:o,className:a,...u},p)=>{let s=y(),l=s?.presentation==="thin",c=e.useRef(null),k=e.useRef(null),M=`${e.useId()}-results`,N=e.useRef(t);N.current=t;let P=e.useRef(r);P.current=r;let m=n.replace(/\.+$/,""),h=e.useCallback(i=>{i.key==="Escape"&&N.current&&(i.preventDefault(),i.stopPropagation(),P.current(""),c.current?.focus())},[]),S=e.useCallback(i=>{if(i.defaultPrevented)return;let v=k.current;if(!v)return;let w=v.querySelector('[role="group"]');if(!w)return;let b=Array.from(w.querySelectorAll("a, button"));if(b.length===0)return;let G=document.activeElement,I=G===c.current,R=b.indexOf(G);if(i.key.length===1&&!i.ctrlKey&&!i.metaKey&&!i.altKey&&!I&&R!==-1){c.current?.focus();return}switch(i.key){case"ArrowDown":{i.preventDefault(),I||R===-1?b[0]?.focus():R<b.length-1&&b[R+1]?.focus();break}case"ArrowUp":{i.preventDefault(),R<=0?c.current?.focus():b[R-1]?.focus();break}case"Home":{I||(i.preventDefault(),b[0]?.focus());break}case"End":{I||(i.preventDefault(),b[b.length-1]?.focus());break}}},[]);return l?e.createElement("div",{...u,ref:p,className:d("kui-SidebarSearch","kui-SidebarSearch--thin",a)},e.createElement(z,null,e.createElement(V,null,e.createElement("button",{type:"button",className:d("kui-reset","kui-BaseMenuItem","kui-SidebarMenuButton","kui-SidebarSearchTrigger"),"aria-label":m},e.createElement("span",{className:"kui-SidebarMenuIconWrapper"},e.createElement(B,null)),e.createElement("span",{className:"kui-SidebarMenuLabel"},"Search"))),e.createElement(j,{side:"right",align:"start",size:"2",width:"280px","aria-label":m},e.createElement("div",{ref:k,className:"kui-SidebarSearchPopover",role:"search",onKeyDown:S},e.createElement("div",{className:"kui-SidebarSearchInputWrapper"},e.createElement(B,{className:"kui-SidebarSearchIcon"}),e.createElement("input",{ref:c,type:"search",className:"kui-SidebarSearchInput",value:t,onChange:i=>r(i.target.value),onKeyDown:h,placeholder:n,"aria-label":m,"aria-controls":o?M:void 0,autoFocus:!0}),t&&e.createElement("button",{type:"button",className:"kui-reset kui-SidebarSearchClear",onClick:()=>{r(""),c.current?.focus()},"aria-label":"Clear search"},e.createElement(J,null))),o&&e.createElement("div",{id:M,role:"group","aria-label":"Search results"},o))))):e.createElement("div",{...u,ref:p,className:d("kui-SidebarSearch","kui-SidebarSearch--expanded","kui-ShellPaneChrome",`kui-r-size-${s?.size??"2"}`,a),role:"search"},e.createElement("div",{className:"kui-SidebarSearchInputWrapper"},e.createElement(B,{className:"kui-SidebarSearchIcon"}),e.createElement("input",{ref:c,type:"search",className:"kui-SidebarSearchInput",value:t,onChange:i=>r(i.target.value),onKeyDown:h,placeholder:n,"aria-label":m}),t&&e.createElement("button",{type:"button",className:"kui-reset kui-SidebarSearchClear",onClick:()=>{r(""),c.current?.focus()},"aria-label":"Clear search"},e.createElement(J,null))))});se.displayName="Sidebar.Search";export{Q as a,Y as b,D as c,T as d,ee as e,te as f,re as g,oe as h,ae as i,ie as j,se as k,fe as l};
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
import{a as F}from"./chunk-324VC67W.js";import{a as O,b as U,c as q,e as C,f as $}from"./chunk-67UEMB4K.js";import{a as E}from"./chunk-J54GYD7A.js";import{a as z,b as V,c as j}from"./chunk-MJKVVGGV.js";import{d as H}from"./chunk-GKDGNPBD.js";import{b as L}from"./chunk-5KMEUZWN.js";import{a as W}from"./chunk-QPRUTOLI.js";import{b as y,c as K}from"./chunk-MJROOEPE.js";import{a as ue}from"./chunk-VQPANPMI.js";var fe={};ue(fe,{Group:()=>oe,GroupContent:()=>ie,GroupLabel:()=>ae,Menu:()=>Y,MenuButton:()=>T,MenuItem:()=>D,MenuSub:()=>ee,MenuSubContent:()=>re,MenuSubTrigger:()=>te,Search:()=>se,Separator:()=>Q});import*as e from"react";import d from"classnames";import*as f from"@radix-ui/react-accordion";var Q=e.forwardRef(({className:t,...r},n)=>e.createElement(F,{...r,ref:n,className:d("kui-SidebarSeparator",t)}));Q.displayName="Sidebar.Separator";var Y=e.forwardRef(({className:t,...r},n)=>e.createElement("ul",{...r,ref:n,className:d("kui-SidebarMenu",t)}));Y.displayName="Sidebar.Menu";var D=e.forwardRef(({className:t,...r},n)=>e.createElement("li",{...r,ref:n,className:d("kui-SidebarMenuItem",t)}));D.displayName="Sidebar.MenuItem";function A(t){if(typeof t=="function"){let r=t;return r.displayName||r.name}if(t&&typeof t=="object"){let r=t;return r.displayName||A(r.render)||A(r.type)}}function ce(t){return t.type==="svg"||t.props?.icon?!0:A(t.type)?.includes("Icon")??!1}function Z(t){return typeof t=="string"||typeof t=="number"}function de(t){let r=e.Children.toArray(t),n=[],o=[];for(let a of r)e.isValidElement(a)&&ce(a)?n.push(a):o.push(Z(a)?e.createElement("span",{key:o.length,className:"kui-SidebarMenuLabel"},a):a);return n.length===0&&r.length>1&&e.isValidElement(r[0])&&(n.push(r[0]),o.shift()),{icons:n,labels:o}}function pe(t){return e.Children.map(t,r=>Z(r)?e.createElement("span",{className:"kui-SidebarMenuLabel"},r):r)}function _(t){if(t.key!=="ArrowDown"&&t.key!=="ArrowUp")return;let r=t.currentTarget.closest(".kui-SidebarContent, .kui-SidebarSearchPopover"),n=r?Array.from(r.querySelectorAll(".kui-SidebarMenuButton")).filter(u=>u.offsetParent!==null):[],o=n.indexOf(t.currentTarget),a=n[o+(t.key==="ArrowDown"?1:-1)];o!==-1&&a&&(t.preventDefault(),a.focus())}var T=e.forwardRef(({asChild:t=!1,isActive:r=!1,shortcut:n,badge:o,className:a,children:u,onKeyDown:p,...s},l)=>{let c=y(),k=e.useContext(K),g=c?.size??k,M=c?.presentation==="thin",N=t?L:"button",P=i=>{p?.(i),i.defaultPrevented||_(i)},m=M?null:e.createElement(e.Fragment,null,o&&e.createElement("div",{className:"kui-SidebarMenuBadge"},typeof o=="string"?e.createElement(E,{size:g,variant:"soft"},o):e.createElement(E,{size:o.size||g,variant:o.variant||"soft",color:o.color,radius:o.radius},o.content)),n&&e.createElement("div",{className:"kui-BaseMenuShortcut kui-SidebarMenuShortcut"},e.createElement(W,{size:g},n))),h=i=>{if(M){let{icons:v,labels:w}=de(i);if(v.length>0)return e.createElement(e.Fragment,null,e.createElement("span",{className:"kui-SidebarMenuIconWrapper"},v),w)}return e.createElement(e.Fragment,null,pe(i),m)},S;return t&&e.isValidElement(u)&&e.Children.count(u)===1?S=e.cloneElement(u,void 0,h(u.props.children)):t?S=u:S=h(u),e.createElement(N,{type:t?void 0:"button",...s,ref:l,"aria-current":r?"page":void 0,className:d("kui-reset","kui-BaseMenuItem","kui-SidebarMenuButton",a),"data-active":r||void 0,onKeyDown:P},S)});T.displayName="Sidebar.MenuButton";var x=e.createContext("accordion"),ee=e.forwardRef(({defaultOpen:t=!1,children:r,...n},o)=>(y()?.presentation==="thin"?"dropdown":"accordion")==="dropdown"?e.createElement("div",{...n,ref:o},e.createElement(O,null,e.createElement(x.Provider,{value:"dropdown"},r))):e.createElement("div",{...n,ref:o},e.createElement(x.Provider,{value:"accordion"},e.createElement(f.Root,{type:"single",collapsible:!0,defaultValue:t?"item":void 0},e.createElement(f.Item,{value:"item"},r)))));ee.displayName="Sidebar.MenuSub";var te=e.forwardRef(({asChild:t=!1,className:r,children:n,onKeyDown:o,...a},u)=>e.useContext(x)==="dropdown"?e.createElement(U,null,e.createElement("button",{...a,onKeyDown:o,ref:u,type:"button","aria-haspopup":"menu",className:d("kui-reset","kui-BaseMenuItem","kui-SidebarMenuButton","kui-SidebarMenuSubTrigger",r)},n)):e.createElement(f.Header,{asChild:!0},e.createElement("div",null,e.createElement(f.Trigger,{...a,onKeyDown:s=>{_(s),o?.(s)},ref:u,asChild:t,className:d("kui-reset","kui-BaseMenuItem","kui-SidebarMenuButton","kui-SidebarMenuSubTrigger",r)},t?n:e.createElement(e.Fragment,null,n,e.createElement(H,{className:d("kui-BaseMenuSubTriggerIcon","kui-SidebarMenuSubTriggerIcon")}))))));te.displayName="Sidebar.MenuSubTrigger";function X(t,r){if(e.isValidElement(t)&&t.type===T){let{asChild:n,isActive:o,shortcut:a,badge:u,type:p,children:s,...l}=t.props,c={...l,"data-active":o||void 0,"aria-current":o?"page":void 0};return n&&e.isValidElement(s)&&e.Children.count(s)===1?e.createElement(C,{key:r,...c,asChild:!0},s):e.createElement(C,{key:r,...c},s)}return e.isValidElement(t)?e.createElement(C,{key:r,asChild:!0},t):e.createElement(C,{key:r},t)}function le(t){return e.Children.map(t,(r,n)=>e.isValidElement(r)&&r.type===T?e.createElement(D,{key:r.key??n},r):r)}var re=e.forwardRef(({className:t,children:r,...n},o)=>{let a=y();if(e.useContext(x)==="dropdown"){let p=e.Children.map(r,(s,l)=>{if(e.isValidElement(s)&&s.type===D){let c=e.Children.toArray(s.props.children);return X(c.length===1?c[0]:c,l)}return X(s,l)});return e.createElement(q,{...n,ref:o,size:a?.size,className:d(t)},e.createElement($,null,p))}return e.createElement(f.Content,{...n,ref:o,className:d("kui-SidebarMenuSubContent",t)},e.createElement("ul",{className:"kui-SidebarMenuSubList"},le(r)))});re.displayName="Sidebar.MenuSubContent";var ne=e.createContext(null),oe=e.forwardRef(({className:t,...r},n)=>{let o=e.useId(),[a,u]=e.useState(null),p=e.useMemo(()=>({labelId:o,setLabelId:u}),[o]);return e.createElement(ne.Provider,{value:p},e.createElement("div",{role:a?"group":void 0,"aria-labelledby":a??void 0,...r,ref:n,className:d("kui-BaseMenuGroup","kui-SidebarGroup",t)}))});oe.displayName="Sidebar.Group";var ae=e.forwardRef(({asChild:t=!1,className:r,id:n,...o},a)=>{let u=t?L:"div",p=e.useContext(ne),s=n??p?.labelId,l=p?.setLabelId;return e.useEffect(()=>{if(!(!l||!s))return l(s),()=>l(null)},[l,s]),e.createElement(u,{...o,id:s,ref:a,className:d("kui-BaseMenuLabel","kui-SidebarGroupLabel",r)})});ae.displayName="Sidebar.GroupLabel";var ie=e.forwardRef(({className:t,...r},n)=>e.createElement("div",{...r,ref:n,className:d("kui-SidebarGroupContent",t)}));ie.displayName="Sidebar.GroupContent";var B=({className:t})=>e.createElement("svg",{className:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},e.createElement("circle",{cx:"11",cy:"11",r:"8"}),e.createElement("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})),J=({className:t})=>e.createElement("svg",{className:t,width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},e.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),se=e.forwardRef(({value:t,onValueChange:r,placeholder:n="Search...",children:o,className:a,...u},p)=>{let s=y(),l=s?.presentation==="thin",c=e.useRef(null),k=e.useRef(null),M=`${e.useId()}-results`,N=e.useRef(t);N.current=t;let P=e.useRef(r);P.current=r;let m=n.replace(/\.+$/,""),h=e.useCallback(i=>{i.key==="Escape"&&N.current&&(i.preventDefault(),i.stopPropagation(),P.current(""),c.current?.focus())},[]),S=e.useCallback(i=>{if(i.defaultPrevented)return;let v=k.current;if(!v)return;let w=v.querySelector('[role="group"]');if(!w)return;let b=Array.from(w.querySelectorAll("a, button"));if(b.length===0)return;let G=document.activeElement,I=G===c.current,R=b.indexOf(G);if(i.key.length===1&&!i.ctrlKey&&!i.metaKey&&!i.altKey&&!I&&R!==-1){c.current?.focus();return}switch(i.key){case"ArrowDown":{i.preventDefault(),I||R===-1?b[0]?.focus():R<b.length-1&&b[R+1]?.focus();break}case"ArrowUp":{i.preventDefault(),R<=0?c.current?.focus():b[R-1]?.focus();break}case"Home":{I||(i.preventDefault(),b[0]?.focus());break}case"End":{I||(i.preventDefault(),b[b.length-1]?.focus());break}}},[]);return l?e.createElement("div",{...u,ref:p,className:d("kui-SidebarSearch","kui-SidebarSearch--thin",a)},e.createElement(z,null,e.createElement(V,null,e.createElement("button",{type:"button",className:d("kui-reset","kui-BaseMenuItem","kui-SidebarMenuButton","kui-SidebarSearchTrigger"),"aria-label":m},e.createElement("span",{className:"kui-SidebarMenuIconWrapper"},e.createElement(B,null)),e.createElement("span",{className:"kui-SidebarMenuLabel"},"Search"))),e.createElement(j,{side:"right",align:"start",size:"2",width:"280px","aria-label":m},e.createElement("div",{ref:k,className:"kui-SidebarSearchPopover",role:"search",onKeyDown:S},e.createElement("div",{className:"kui-SidebarSearchInputWrapper"},e.createElement(B,{className:"kui-SidebarSearchIcon"}),e.createElement("input",{ref:c,type:"search",className:"kui-SidebarSearchInput",value:t,onChange:i=>r(i.target.value),onKeyDown:h,placeholder:n,"aria-label":m,"aria-controls":o?M:void 0,autoFocus:!0}),t&&e.createElement("button",{type:"button",className:"kui-reset kui-SidebarSearchClear",onClick:()=>{r(""),c.current?.focus()},"aria-label":"Clear search"},e.createElement(J,null))),o&&e.createElement("div",{id:M,role:"group","aria-label":"Search results"},o))))):e.createElement("div",{...u,ref:p,className:d("kui-SidebarSearch","kui-SidebarSearch--expanded","kui-ShellPaneChrome",`kui-r-size-${s?.size??"2"}`,a),role:"search"},e.createElement("div",{className:"kui-SidebarSearchInputWrapper"},e.createElement(B,{className:"kui-SidebarSearchIcon"}),e.createElement("input",{ref:c,type:"search",className:"kui-SidebarSearchInput",value:t,onChange:i=>r(i.target.value),onKeyDown:h,placeholder:n,"aria-label":m}),t&&e.createElement("button",{type:"button",className:"kui-reset kui-SidebarSearchClear",onClick:()=>{r(""),c.current?.focus()},"aria-label":"Clear search"},e.createElement(J,null))))});se.displayName="Sidebar.Search";export{Q as a,Y as b,D as c,T as d,ee as e,te as f,re as g,oe as h,ae as i,ie as j,se as k,fe as l};
|
|
3
|
+
//# sourceMappingURL=chunk-2FYUM6TA.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{a as Ge,b as Ye}from"./chunk-4G3FJUER.js";import{a as Xe}from"./chunk-ZG2XQUOH.js";import{a as Ke}from"./chunk-YMUERC2J.js";import{a as je}from"./chunk-H73AMXCH.js";import{c as ue,d as pe,e as we,f as fe,i as Ae,j as Ie,k as Ne}from"./chunk-TSWHVZ47.js";import{c as xe,d as ke}from"./chunk-QEDKL23P.js";import{b as Ee}from"./chunk-5ON3XLRD.js";import{a as Le}from"./chunk-ANQLWGFN.js";import{a as $e}from"./chunk-QRV32INS.js";import{a as Fe,b as me}from"./chunk-3QWGSRYC.js";import{a as Pe,b as he,c as ve}from"./chunk-LTUW36HM.js";import{a as De,b as Be,c as Ve}from"./chunk-QKCNGEX4.js";import{a as Oe}from"./chunk-WEBNIUEX.js";import{a as J,b as We,c as _e,d as Ue,g as qe}from"./chunk-XUCR7L4G.js";import{a as ye}from"./chunk-G66WDIIV.js";import{e as ie,f as Te,h as Me,i as ne,j as ze,k as ce,l as de,n as He,o as oe}from"./chunk-GHWEXMF6.js";import{a as st}from"./chunk-VQPANPMI.js";var Pt={};st(Pt,{Bottom:()=>$e,Content:()=>at,Header:()=>nt,Inspector:()=>Ke,Left:()=>ot,PaneFooter:()=>Ie,PaneHeader:()=>Ae,Panel:()=>Ce,Rail:()=>lt,Root:()=>tt,Scroll:()=>Ne,Sidebar:()=>je,Trigger:()=>rt,useResponsivePresentation:()=>Xe,useShell:()=>Ye,useSidebarMode:()=>Ge});import*as e from"react";import $ from"classnames";import{Slot as it}from"radix-ui";import{useComposedRefs as be,useLayoutEffect as ct}from"radix-ui/internal";var Re=0;function Je(a){Re=Math.max(0,Re+a);let r=document.documentElement;Re>0?r.setAttribute("data-kui-shell-lock",""):r.removeAttribute("data-kui-shell-lock")}var Se="data-kui-shell-inert",dt=30;function Q(a,r){return r===null||r===a||r===a.body||r===a.documentElement}function Qe(a,r,s){for(let u of a.querySelectorAll("[data-shell-trigger][aria-controls]"))if(!(u.getAttribute("aria-controls")!==r||u.closest("[inert]"))&&!(s&&!s.some(R=>R.contains(u))))return u;return null}var ut={values:["1","2","3"]},et=e.createContext(null),Ze=64;function ge(a){return a.querySelector(":scope > .kui-ShellContent > .kui-ShellScroll > .kui-ScrollAreaViewport")??a.querySelector(":scope > .kui-ShellContent")}var tt=e.forwardRef(({className:a,children:r,height:s="full",contained:u,size:R,style:g,onKeyDown:F,onFocus:x,...k},T)=>{let P=Ee(R,ut),[i]=e.useState(Te),C=e.useCallback(t=>Me(i,t),[i]);e.useSyncExternalStore(C,()=>i.version,()=>0);let S=e.useRef(null),D=be(T,S),[E,w]=e.useState(()=>new Set),A=e.useCallback(t=>{w(n=>n.has(t)?n:new Set(n).add(t))},[]),f=e.useCallback(t=>{w(n=>{if(!n.has(t))return n;let o=new Set(n);return o.delete(t),o})},[]),m=e.useMemo(()=>({registerInset:A,unregisterInset:f}),[A,f]),I=e.useCallback(()=>{for(let t of i.entries.values())t.overlayLive&&t.setValue("closed","dismiss")},[i]),M=e.useCallback(()=>[...i.entries.values()].filter(t=>t.overlayLive&&t.el).map(t=>({name:t.name,id:t.id,el:t.el})),[i]),y=[...i.entries.values()].filter(t=>t.overlayLive&&t.el).length,N=u===!0||s!=="full"&&s!=="auto",V=!N&&s==="full",[Z,le]=e.useState(void 0);e.useEffect(()=>{if(!V)return;let t=S.current,n=t?.ownerDocument.defaultView;if(!t||!n||typeof n.matchMedia!="function")return;let o=xe(),c=o?n.scrollY:ge(t)?.scrollTop??0,h=0,v=0,L=()=>{v&&cancelAnimationFrame(v),v=requestAnimationFrame(()=>{v=0})},U=()=>{o&&!v&&(c=n.scrollY)},q=l=>{!o&&!v&&l.target instanceof HTMLElement&&l.target===ge(t)&&(c=l.target.scrollTop)};n.addEventListener("resize",L),n.addEventListener("scroll",U,{passive:!0}),t.addEventListener("scroll",q,{passive:!0,capture:!0});let se=ke(l=>{o=l;let d=c;h&&cancelAnimationFrame(h),h=requestAnimationFrame(()=>{if(h=0,l)n.scrollTo(0,d);else{let p=ge(t);p&&(p.scrollTop=d)}})});return()=>{h&&cancelAnimationFrame(h),v&&cancelAnimationFrame(v),n.removeEventListener("resize",L),n.removeEventListener("scroll",U),t.removeEventListener("scroll",q,{capture:!0}),se()}},[V]);let K=e.useCallback(()=>{let t=S.current;if(!t)return;let n=M().map(o=>o.el);for(let o of t.children){if(!(o instanceof HTMLElement)||o.classList.contains("kui-ShellScrim"))continue;let c=n.some(h=>o===h||o.contains(h));n.length===0||c?o.hasAttribute(Se)&&(o.removeAttribute(Se),o.inert=!1):o.inert||(o.setAttribute(Se,""),o.inert=!0)}},[M]),j=e.useRef(null),G=e.useRef([]),ee=e.useRef(null),O=e.useRef(!1),z=e.useRef(0),W=e.useCallback(()=>{z.current&&cancelAnimationFrame(z.current),z.current=0},[]),_=e.useCallback((t,n)=>{W();let o=0,c=()=>{if(z.current=0,!!t.isConnected){if(n(t.ownerDocument.activeElement)){t.focus({preventScroll:!0});return}o+=1,o<dt&&(z.current=requestAnimationFrame(c))}};z.current=requestAnimationFrame(c)},[W]);e.useEffect(()=>()=>{W(),O.current&&(O.current=!1,Je(-1))},[W]),e.useEffect(()=>{let t=S.current;if(!t)return;let n=t.ownerDocument,o=M(),c=o.map(l=>l.el),h=!N&&o.length>0;h!==O.current&&(O.current=h,Je(h?1:-1));let v=G.current;G.current=o;let L=v.filter(l=>{if(c.includes(l.el))return!1;let d=i.entries.get(l.name);return!l.el.isConnected||!d||d.el!==l.el||d.value==="closed"}),U=l=>l!==null&&L.some(d=>d.el.contains(l));if(v.length===0&&o.length>0){let l=n.activeElement,d=l instanceof HTMLElement&&!Q(n,l)&&!c.some(p=>p.contains(l))?l:null;if(d&&!t.contains(d)){let p=ee.current;p&&p.isConnected&&!c.some(te=>te.contains(p))&&(d=p)}j.current=d}if(K(),o.length===0){let l=j.current;if(j.current=null,L.length===0)return;let p=(H=>H!==null&&H.isConnected&&!H.closest("[inert]")&&!U(H))(l)?l:null;for(let H of L)p??(p=Qe(n,H.id));if(!p)return;let te=H=>Q(n,H)||U(H);te(n.activeElement)?p.focus({preventScroll:!0}):_(p,te);return}if(L.length>0){let l=n.activeElement;if(Q(n,l)||U(l)){let d=null;for(let p of L)d??(d=Qe(n,p.id,c));(d??c[c.length-1]).focus({preventScroll:!0})}}let q=c.filter(l=>!v.some(d=>d.el===l)),se=n.activeElement;q.length>0&&!c.some(l=>l.contains(se))&&(q[0].focus({preventScroll:!0}),_(q[0],l=>Q(n,l)||l instanceof Element&&l.closest("[inert]")!==null))}),e.useEffect(()=>{let t=S.current;if(!t||y===0||typeof MutationObserver>"u")return;let n=new MutationObserver(K);return n.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["inert"]}),()=>n.disconnect()},[y,K]);let Y=t=>{F?.(t),!(t.key!=="Escape"||t.defaultPrevented||y===0)&&(I(),t.stopPropagation())};e.useEffect(()=>{let t=S.current;if(!t||y===0)return;let n=t.ownerDocument,o=c=>{c.key!=="Escape"||c.defaultPrevented||!Q(n,c.target)||I()};return n.addEventListener("keydown",o),()=>n.removeEventListener("keydown",o)},[y,I]);let ae=t=>{x?.(t),t.target instanceof HTMLElement&&S.current?.contains(t.target)&&(ee.current=t.target)},B=i.entries.get("rail"),X=B!==void 0&&B.value!==void 0&&B.value!=="closed"?E.has("rail")?`calc(${B.size}px + 2 * var(--shell-inset-gap))`:`${B.size}px`:void 0,re=s==="full"?{}:s==="auto"?{height:"auto"}:typeof s=="number"?{height:`${s}px`}:{height:s};return e.createElement(ze.Provider,{value:i},e.createElement(ue.Provider,{value:P},e.createElement(pe.Provider,{value:!1},e.createElement(we.Provider,{value:V},e.createElement(et.Provider,{value:le},e.createElement(He.Provider,{value:m},e.createElement(Le.Provider,{value:void 0},e.createElement("div",{...k,ref:D,className:$("kui-ShellRoot",a),"data-height":s==="auto"&&!N?"auto":void 0,"data-contained":N||void 0,"data-window":V||void 0,"data-has-inset":E.size>0||void 0,"data-overlay-live":y>0||void 0,onKeyDown:Y,onFocus:ae,style:{...re,...X?{"--shell-rail-offset":X}:{},...Z!==void 0?{"--kui-shell-header-h":`${Z}px`}:{},...g}},r,e.createElement("div",{className:"kui-ShellScrim","aria-hidden":!0,onClick:I})))))))))});tt.displayName="Shell.Root";var nt=e.forwardRef(({className:a,height:r=Ze,style:s,...u},R)=>{let g=e.useContext(et);return ct(()=>{if(g)return g(r===Ze?void 0:r),()=>g(void 0)},[g,r]),e.createElement("header",{...u,ref:R,className:$("kui-ShellHeader",a),style:{...s,"--shell-header-height":`${r}px`}})});nt.displayName="Shell.Header";var ot=e.forwardRef(({children:a},r)=>(e.useEffect(()=>{},[]),e.createElement(e.Fragment,null,a)));ot.displayName="Shell.Left";var pt={controlled:"open",default:"defaultOpen"},lt=e.forwardRef((a,r)=>{let{className:s,presentation:u,expandedSize:R=64,collapsible:g,onExpand:F,onCollapse:x,children:k,style:T,open:P,defaultOpen:i,onOpenChange:C,inset:S,id:D,...E}=a,{table:w,attributes:A}=ve(u,"fixed"),f=Pe({name:"rail",label:"Rail",propNames:pt,id:D,controlled:J(P),defaultValue:J(i),presentationTable:w,builtIn:We,onChange:(I,M)=>C?.(I!=="closed",{reason:M}),onExpand:F,onCollapse:x,size:R});oe("rail",S);let m=be(r,f.setElement);return e.createElement("div",{...E,role:E.role??"navigation",id:f.id,ref:m,className:$("kui-ShellPane","kui-ShellRail",s),...he(f,A),"data-inset":S||void 0,tabIndex:f.overlaying?-1:E.tabIndex,style:{...T,"--rail-size":`${R}px`}},e.createElement(ft,null,k))});lt.displayName="Shell.Rail";function ft({children:a}){let r=e.useContext(ue);return e.createElement("div",{className:$("kui-ShellRailContent",`kui-r-size-${r}`)},e.createElement(fe,{presentation:"thin"},a))}var mt={controlled:"open",default:"defaultOpen"},Ce=e.forwardRef((a,r)=>{let{className:s,presentation:u,defaultOpen:R,open:g,onOpenChange:F,size:x,defaultSize:k,expandedSize:T=288,minSize:P=100,maxSize:i=800,resizable:C=!1,collapsible:S=!0,onExpand:D,onCollapse:E,onResize:w,onResizeStart:A,onResizeEnd:f,snapPoints:m,snapTolerance:I,collapseThreshold:M,paneId:y,persistence:N,children:V,style:Z,onSizeChange:le,sizeUpdate:K,sizeUpdateMs:j=50,inset:G,id:ee,...O}=a,z=ce("Shell.Panel"),W=de(z,"rail"),_=ve(u,"fixed"),Y=u===void 0,ae=Y?W?.presentationTable??ie:_.table,B=Y?{"data-presentation-follows":""}:_.attributes,b=Pe({name:"panel",label:"Panel",propNames:mt,id:ee,controlled:J(g),defaultValue:J(R),presentationTable:ae,builtIn:_e,onChange:(v,L)=>F?.(v!=="closed",{reason:L}),onExpand:D,onCollapse:E,size:T});oe("panel",G),e.useEffect(()=>{(m!==void 0||M!==void 0||y!==void 0||N!==void 0)&&void 0},[m,M,y,N]);let X=e.useRef(null),re=be(r,b.setElement,X),t=Be({name:"panel",elementId:b.id,elementRef:X,cssVarName:"--panel-size",orientation:"vertical",edge:"end",growth:Ue,expandedSize:T,minSize:P,maxSize:i,resizable:C,collapsible:S,size:x,defaultSize:k,onSizeChange:le,sizeUpdate:K,sizeUpdateMs:j,onResize:w,onResizeStart:A,onResizeEnd:f,snapPoints:m,snapTolerance:I,collapseThreshold:M,paneId:y,persistence:N,overlaying:b.overlaying,overlayingNow:()=>(Y?z.entries.get("rail")?.presentationTable??ie:_.table)[ye()]==="overlay",requestCollapse:()=>b.setValue("closed","toggle"),requestToggle:()=>b.toggle("toggle")}),n=De(x,k,P,i),{handles:o,content:c}=Ve(V,me),h=C&&b.shown!==!1&&!b.overlaying?e.createElement(Oe.Provider,{value:t},o.length>0?o:e.createElement(Fe,null)):null;return e.createElement("div",{...qe(O),role:O.role??"navigation",id:b.id,ref:re,className:$("kui-ShellPane","kui-ShellPanel",s),...he(b,B),"data-inset":G||void 0,tabIndex:b.overlaying?-1:O.tabIndex,style:{...Z,"--panel-expanded-size":`${T}px`,...n?{"--panel-size":n}:{}}},e.createElement("div",{className:"kui-ShellPanelContent"},e.createElement(fe,null,c)),h)});Ce.displayName="Shell.Panel";Ce.Handle=me;var at=e.forwardRef(({className:a,inset:r,children:s,...u},R)=>(oe("content",r),e.createElement("main",{...u,ref:R,className:$("kui-ShellContent",a),"data-inset":r||void 0},e.createElement(pe.Provider,{value:!0},s))));at.displayName="Shell.Content";var rt=e.forwardRef(({target:a,action:r="toggle",peekOnHover:s,asChild:u=!1,onClick:R,onMouseEnter:g,onMouseLeave:F,children:x,...k},T)=>{let P=ce("Shell.Trigger");e.useEffect(()=>{a==="left"&&void 0,s&&void 0},[a,s]);let i=a==="left"?"rail":a,C=de(P,i),S=C?.value===void 0?void 0:C.value!=="closed",D=f=>{if(R?.(f),f.defaultPrevented)return;let m=P.entries.get(i);m&&(P.peek===i&&ne(P,null),r==="toggle"?m.toggle("toggle"):r==="expand"?m.setValue("open","toggle"):m.setValue("closed","toggle"))},E=f=>{if(g?.(f),!s)return;let m=P.entries.get(i);m&&m.value==="closed"&&m.presentation!=="overlay"&&ne(P,i)},w=f=>{F?.(f),s&&P.peek===i&&ne(P,null)},A=u?it.Root:"button";return e.createElement(A,{...!u&&{type:"button"},"aria-controls":C?.id,"aria-expanded":S,...k,ref:T,onClick:D,onMouseEnter:E,onMouseLeave:w,"data-shell-trigger":a,"data-shell-action":r},x)});rt.displayName="Shell.Trigger";export{tt as a,nt as b,ot as c,lt as d,Ce as e,at as f,rt as g,Pt as h};
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
import{a as Ge,b as Ye}from"./chunk-4G3FJUER.js";import{a as Xe}from"./chunk-ZG2XQUOH.js";import{a as Ke}from"./chunk-YMUERC2J.js";import{a as je}from"./chunk-AS2STDGA.js";import{c as ue,d as pe,e as we,f as fe,i as Ae,j as Ie,k as Ne}from"./chunk-MJROOEPE.js";import{c as xe,d as ke}from"./chunk-QEDKL23P.js";import{b as Ee}from"./chunk-5ON3XLRD.js";import{a as Le}from"./chunk-ANQLWGFN.js";import{a as $e}from"./chunk-QRV32INS.js";import{a as Fe,b as me}from"./chunk-3QWGSRYC.js";import{a as Pe,b as he,c as ve}from"./chunk-LTUW36HM.js";import{a as De,b as Be,c as Ve}from"./chunk-QKCNGEX4.js";import{a as Oe}from"./chunk-WEBNIUEX.js";import{a as J,b as We,c as _e,d as Ue,g as qe}from"./chunk-XUCR7L4G.js";import{a as ye}from"./chunk-G66WDIIV.js";import{e as ie,f as Te,h as Me,i as ne,j as ze,k as ce,l as de,n as He,o as oe}from"./chunk-GHWEXMF6.js";import{a as st}from"./chunk-VQPANPMI.js";var Pt={};st(Pt,{Bottom:()=>$e,Content:()=>at,Header:()=>nt,Inspector:()=>Ke,Left:()=>ot,PaneFooter:()=>Ie,PaneHeader:()=>Ae,Panel:()=>Ce,Rail:()=>lt,Root:()=>tt,Scroll:()=>Ne,Sidebar:()=>je,Trigger:()=>rt,useResponsivePresentation:()=>Xe,useShell:()=>Ye,useSidebarMode:()=>Ge});import*as e from"react";import $ from"classnames";import{Slot as it}from"radix-ui";import{useComposedRefs as be,useLayoutEffect as ct}from"radix-ui/internal";var Re=0;function Je(a){Re=Math.max(0,Re+a);let r=document.documentElement;Re>0?r.setAttribute("data-kui-shell-lock",""):r.removeAttribute("data-kui-shell-lock")}var Se="data-kui-shell-inert",dt=30;function Q(a,r){return r===null||r===a||r===a.body||r===a.documentElement}function Qe(a,r,s){for(let u of a.querySelectorAll("[data-shell-trigger][aria-controls]"))if(!(u.getAttribute("aria-controls")!==r||u.closest("[inert]"))&&!(s&&!s.some(R=>R.contains(u))))return u;return null}var ut={values:["1","2","3"]},et=e.createContext(null),Ze=64;function ge(a){return a.querySelector(":scope > .kui-ShellContent > .kui-ShellScroll > .kui-ScrollAreaViewport")??a.querySelector(":scope > .kui-ShellContent")}var tt=e.forwardRef(({className:a,children:r,height:s="full",contained:u,size:R,style:g,onKeyDown:F,onFocus:x,...k},T)=>{let P=Ee(R,ut),[i]=e.useState(Te),C=e.useCallback(t=>Me(i,t),[i]);e.useSyncExternalStore(C,()=>i.version,()=>0);let S=e.useRef(null),D=be(T,S),[E,w]=e.useState(()=>new Set),A=e.useCallback(t=>{w(n=>n.has(t)?n:new Set(n).add(t))},[]),f=e.useCallback(t=>{w(n=>{if(!n.has(t))return n;let o=new Set(n);return o.delete(t),o})},[]),m=e.useMemo(()=>({registerInset:A,unregisterInset:f}),[A,f]),I=e.useCallback(()=>{for(let t of i.entries.values())t.overlayLive&&t.setValue("closed","dismiss")},[i]),M=e.useCallback(()=>[...i.entries.values()].filter(t=>t.overlayLive&&t.el).map(t=>({name:t.name,id:t.id,el:t.el})),[i]),y=[...i.entries.values()].filter(t=>t.overlayLive&&t.el).length,N=u===!0||s!=="full"&&s!=="auto",V=!N&&s==="full",[Z,le]=e.useState(void 0);e.useEffect(()=>{if(!V)return;let t=S.current,n=t?.ownerDocument.defaultView;if(!t||!n||typeof n.matchMedia!="function")return;let o=xe(),c=o?n.scrollY:ge(t)?.scrollTop??0,h=0,v=0,L=()=>{v&&cancelAnimationFrame(v),v=requestAnimationFrame(()=>{v=0})},U=()=>{o&&!v&&(c=n.scrollY)},q=l=>{!o&&!v&&l.target instanceof HTMLElement&&l.target===ge(t)&&(c=l.target.scrollTop)};n.addEventListener("resize",L),n.addEventListener("scroll",U,{passive:!0}),t.addEventListener("scroll",q,{passive:!0,capture:!0});let se=ke(l=>{o=l;let d=c;h&&cancelAnimationFrame(h),h=requestAnimationFrame(()=>{if(h=0,l)n.scrollTo(0,d);else{let p=ge(t);p&&(p.scrollTop=d)}})});return()=>{h&&cancelAnimationFrame(h),v&&cancelAnimationFrame(v),n.removeEventListener("resize",L),n.removeEventListener("scroll",U),t.removeEventListener("scroll",q,{capture:!0}),se()}},[V]);let K=e.useCallback(()=>{let t=S.current;if(!t)return;let n=M().map(o=>o.el);for(let o of t.children){if(!(o instanceof HTMLElement)||o.classList.contains("kui-ShellScrim"))continue;let c=n.some(h=>o===h||o.contains(h));n.length===0||c?o.hasAttribute(Se)&&(o.removeAttribute(Se),o.inert=!1):o.inert||(o.setAttribute(Se,""),o.inert=!0)}},[M]),j=e.useRef(null),G=e.useRef([]),ee=e.useRef(null),O=e.useRef(!1),z=e.useRef(0),W=e.useCallback(()=>{z.current&&cancelAnimationFrame(z.current),z.current=0},[]),_=e.useCallback((t,n)=>{W();let o=0,c=()=>{if(z.current=0,!!t.isConnected){if(n(t.ownerDocument.activeElement)){t.focus({preventScroll:!0});return}o+=1,o<dt&&(z.current=requestAnimationFrame(c))}};z.current=requestAnimationFrame(c)},[W]);e.useEffect(()=>()=>{W(),O.current&&(O.current=!1,Je(-1))},[W]),e.useEffect(()=>{let t=S.current;if(!t)return;let n=t.ownerDocument,o=M(),c=o.map(l=>l.el),h=!N&&o.length>0;h!==O.current&&(O.current=h,Je(h?1:-1));let v=G.current;G.current=o;let L=v.filter(l=>{if(c.includes(l.el))return!1;let d=i.entries.get(l.name);return!l.el.isConnected||!d||d.el!==l.el||d.value==="closed"}),U=l=>l!==null&&L.some(d=>d.el.contains(l));if(v.length===0&&o.length>0){let l=n.activeElement,d=l instanceof HTMLElement&&!Q(n,l)&&!c.some(p=>p.contains(l))?l:null;if(d&&!t.contains(d)){let p=ee.current;p&&p.isConnected&&!c.some(te=>te.contains(p))&&(d=p)}j.current=d}if(K(),o.length===0){let l=j.current;if(j.current=null,L.length===0)return;let p=(H=>H!==null&&H.isConnected&&!H.closest("[inert]")&&!U(H))(l)?l:null;for(let H of L)p??(p=Qe(n,H.id));if(!p)return;let te=H=>Q(n,H)||U(H);te(n.activeElement)?p.focus({preventScroll:!0}):_(p,te);return}if(L.length>0){let l=n.activeElement;if(Q(n,l)||U(l)){let d=null;for(let p of L)d??(d=Qe(n,p.id,c));(d??c[c.length-1]).focus({preventScroll:!0})}}let q=c.filter(l=>!v.some(d=>d.el===l)),se=n.activeElement;q.length>0&&!c.some(l=>l.contains(se))&&(q[0].focus({preventScroll:!0}),_(q[0],l=>Q(n,l)||l instanceof Element&&l.closest("[inert]")!==null))}),e.useEffect(()=>{let t=S.current;if(!t||y===0||typeof MutationObserver>"u")return;let n=new MutationObserver(K);return n.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["inert"]}),()=>n.disconnect()},[y,K]);let Y=t=>{F?.(t),!(t.key!=="Escape"||t.defaultPrevented||y===0)&&(I(),t.stopPropagation())};e.useEffect(()=>{let t=S.current;if(!t||y===0)return;let n=t.ownerDocument,o=c=>{c.key!=="Escape"||c.defaultPrevented||!Q(n,c.target)||I()};return n.addEventListener("keydown",o),()=>n.removeEventListener("keydown",o)},[y,I]);let ae=t=>{x?.(t),t.target instanceof HTMLElement&&S.current?.contains(t.target)&&(ee.current=t.target)},B=i.entries.get("rail"),X=B!==void 0&&B.value!==void 0&&B.value!=="closed"?E.has("rail")?`calc(${B.size}px + 2 * var(--shell-inset-gap))`:`${B.size}px`:void 0,re=s==="full"?{}:s==="auto"?{height:"auto"}:typeof s=="number"?{height:`${s}px`}:{height:s};return e.createElement(ze.Provider,{value:i},e.createElement(ue.Provider,{value:P},e.createElement(pe.Provider,{value:!1},e.createElement(we.Provider,{value:V},e.createElement(et.Provider,{value:le},e.createElement(He.Provider,{value:m},e.createElement(Le.Provider,{value:void 0},e.createElement("div",{...k,ref:D,className:$("kui-ShellRoot",a),"data-height":s==="auto"&&!N?"auto":void 0,"data-contained":N||void 0,"data-window":V||void 0,"data-has-inset":E.size>0||void 0,"data-overlay-live":y>0||void 0,onKeyDown:Y,onFocus:ae,style:{...re,...X?{"--shell-rail-offset":X}:{},...Z!==void 0?{"--kui-shell-header-h":`${Z}px`}:{},...g}},r,e.createElement("div",{className:"kui-ShellScrim","aria-hidden":!0,onClick:I})))))))))});tt.displayName="Shell.Root";var nt=e.forwardRef(({className:a,height:r=Ze,style:s,...u},R)=>{let g=e.useContext(et);return ct(()=>{if(g)return g(r===Ze?void 0:r),()=>g(void 0)},[g,r]),e.createElement("header",{...u,ref:R,className:$("kui-ShellHeader",a),style:{...s,"--shell-header-height":`${r}px`}})});nt.displayName="Shell.Header";var ot=e.forwardRef(({children:a},r)=>(e.useEffect(()=>{},[]),e.createElement(e.Fragment,null,a)));ot.displayName="Shell.Left";var pt={controlled:"open",default:"defaultOpen"},lt=e.forwardRef((a,r)=>{let{className:s,presentation:u,expandedSize:R=64,collapsible:g,onExpand:F,onCollapse:x,children:k,style:T,open:P,defaultOpen:i,onOpenChange:C,inset:S,id:D,...E}=a,{table:w,attributes:A}=ve(u,"fixed"),f=Pe({name:"rail",label:"Rail",propNames:pt,id:D,controlled:J(P),defaultValue:J(i),presentationTable:w,builtIn:We,onChange:(I,M)=>C?.(I!=="closed",{reason:M}),onExpand:F,onCollapse:x,size:R});oe("rail",S);let m=be(r,f.setElement);return e.createElement("div",{...E,role:E.role??"navigation",id:f.id,ref:m,className:$("kui-ShellPane","kui-ShellRail",s),...he(f,A),"data-inset":S||void 0,tabIndex:f.overlaying?-1:E.tabIndex,style:{...T,"--rail-size":`${R}px`}},e.createElement(ft,null,k))});lt.displayName="Shell.Rail";function ft({children:a}){let r=e.useContext(ue);return e.createElement("div",{className:$("kui-ShellRailContent",`kui-r-size-${r}`)},e.createElement(fe,{presentation:"thin"},a))}var mt={controlled:"open",default:"defaultOpen"},Ce=e.forwardRef((a,r)=>{let{className:s,presentation:u,defaultOpen:R,open:g,onOpenChange:F,size:x,defaultSize:k,expandedSize:T=288,minSize:P=100,maxSize:i=800,resizable:C=!1,collapsible:S=!0,onExpand:D,onCollapse:E,onResize:w,onResizeStart:A,onResizeEnd:f,snapPoints:m,snapTolerance:I,collapseThreshold:M,paneId:y,persistence:N,children:V,style:Z,onSizeChange:le,sizeUpdate:K,sizeUpdateMs:j=50,inset:G,id:ee,...O}=a,z=ce("Shell.Panel"),W=de(z,"rail"),_=ve(u,"fixed"),Y=u===void 0,ae=Y?W?.presentationTable??ie:_.table,B=Y?{"data-presentation-follows":""}:_.attributes,b=Pe({name:"panel",label:"Panel",propNames:mt,id:ee,controlled:J(g),defaultValue:J(R),presentationTable:ae,builtIn:_e,onChange:(v,L)=>F?.(v!=="closed",{reason:L}),onExpand:D,onCollapse:E,size:T});oe("panel",G),e.useEffect(()=>{(m!==void 0||M!==void 0||y!==void 0||N!==void 0)&&void 0},[m,M,y,N]);let X=e.useRef(null),re=be(r,b.setElement,X),t=Be({name:"panel",elementId:b.id,elementRef:X,cssVarName:"--panel-size",orientation:"vertical",edge:"end",growth:Ue,expandedSize:T,minSize:P,maxSize:i,resizable:C,collapsible:S,size:x,defaultSize:k,onSizeChange:le,sizeUpdate:K,sizeUpdateMs:j,onResize:w,onResizeStart:A,onResizeEnd:f,snapPoints:m,snapTolerance:I,collapseThreshold:M,paneId:y,persistence:N,overlaying:b.overlaying,overlayingNow:()=>(Y?z.entries.get("rail")?.presentationTable??ie:_.table)[ye()]==="overlay",requestCollapse:()=>b.setValue("closed","toggle"),requestToggle:()=>b.toggle("toggle")}),n=De(x,k,P,i),{handles:o,content:c}=Ve(V,me),h=C&&b.shown!==!1&&!b.overlaying?e.createElement(Oe.Provider,{value:t},o.length>0?o:e.createElement(Fe,null)):null;return e.createElement("div",{...qe(O),role:O.role??"navigation",id:b.id,ref:re,className:$("kui-ShellPane","kui-ShellPanel",s),...he(b,B),"data-inset":G||void 0,tabIndex:b.overlaying?-1:O.tabIndex,style:{...Z,"--panel-expanded-size":`${T}px`,...n?{"--panel-size":n}:{}}},e.createElement("div",{className:"kui-ShellPanelContent"},e.createElement(fe,null,c)),h)});Ce.displayName="Shell.Panel";Ce.Handle=me;var at=e.forwardRef(({className:a,inset:r,children:s,...u},R)=>(oe("content",r),e.createElement("main",{...u,ref:R,className:$("kui-ShellContent",a),"data-inset":r||void 0},e.createElement(pe.Provider,{value:!0},s))));at.displayName="Shell.Content";var rt=e.forwardRef(({target:a,action:r="toggle",peekOnHover:s,asChild:u=!1,onClick:R,onMouseEnter:g,onMouseLeave:F,children:x,...k},T)=>{let P=ce("Shell.Trigger");e.useEffect(()=>{a==="left"&&void 0,s&&void 0},[a,s]);let i=a==="left"?"rail":a,C=de(P,i),S=C?.value===void 0?void 0:C.value!=="closed",D=f=>{if(R?.(f),f.defaultPrevented)return;let m=P.entries.get(i);m&&(P.peek===i&&ne(P,null),r==="toggle"?m.toggle("toggle"):r==="expand"?m.setValue("open","toggle"):m.setValue("closed","toggle"))},E=f=>{if(g?.(f),!s)return;let m=P.entries.get(i);m&&m.value==="closed"&&m.presentation!=="overlay"&&ne(P,i)},w=f=>{F?.(f),s&&P.peek===i&&ne(P,null)},A=u?it.Root:"button";return e.createElement(A,{...!u&&{type:"button"},"aria-controls":C?.id,"aria-expanded":S,...k,ref:T,onClick:D,onMouseEnter:E,onMouseLeave:w,"data-shell-trigger":a,"data-shell-action":r},x)});rt.displayName="Shell.Trigger";export{tt as a,nt as b,ot as c,lt as d,Ce as e,at as f,rt as g,Pt as h};
|
|
3
|
+
//# sourceMappingURL=chunk-4LV37PHM.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{f as x}from"./chunk-
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
import{f as x}from"./chunk-MJROOEPE.js";import{a as T,c as b}from"./chunk-3QWGSRYC.js";import{a as V,b as k,c as I}from"./chunk-LTUW36HM.js";import{a as N,b as w,c as B}from"./chunk-QKCNGEX4.js";import{a as E}from"./chunk-WEBNIUEX.js";import{b as A,d as H,g as U}from"./chunk-XUCR7L4G.js";import{a as y}from"./chunk-G66WDIIV.js";import{o as M}from"./chunk-GHWEXMF6.js";import*as e from"react";import pe from"classnames";import{useComposedRefs as ue}from"radix-ui/internal";var D=t=>t==="collapsed"?"closed":"open",Se=t=>t==="closed"?"collapsed":"expanded";function L(t){if(t===void 0)return;if(typeof t=="string")return D(t);let n={};for(let[r,i]of Object.entries(t))i!==void 0&&(n[r]=D(i));return n}var ce={controlled:"state",default:"defaultState"},be={initial:"overlay",sm:"fixed"},O=e.forwardRef((t,n)=>{let{className:r,presentation:i=be,expandedSize:o=288,minSize:s=200,maxSize:d=400,resizable:m=!1,collapsible:_=!0,onExpand:$,onCollapse:W,onResize:j,onResizeStart:q,onResizeEnd:F,snapPoints:l,snapTolerance:G,collapseThreshold:p,paneId:u,persistence:S,children:K,style:J,state:Q,defaultState:X,onStateChange:Y,size:f,defaultSize:P,onSizeChange:Z,sizeUpdate:ee,sizeUpdateMs:ae=50,inset:h,id:te,...c}=t,{table:g,attributes:ne}=I(i,"fixed"),a=V({name:"sidebar",label:"Sidebar",propNames:ce,id:te,controlled:L(Q),defaultValue:L(X),presentationTable:g,builtIn:A,onChange:(de,le)=>Y?.(Se(de),{reason:le}),onExpand:$,onCollapse:W,size:o});M("sidebar",h),e.useEffect(()=>{(l!==void 0||p!==void 0||u!==void 0||S!==void 0)&&void 0},[l,p,u,S]);let z=e.useRef(null),ie=ue(n,a.setElement,z),oe=w({name:"sidebar",elementId:a.id,elementRef:z,cssVarName:"--sidebar-size",orientation:"vertical",edge:"end",growth:H,expandedSize:o,minSize:s,maxSize:d,resizable:m,collapsible:_,size:f,defaultSize:P,onSizeChange:Z,sizeUpdate:ee,sizeUpdateMs:ae,onResize:j,onResizeStart:q,onResizeEnd:F,snapPoints:l,snapTolerance:G,collapseThreshold:p,paneId:u,persistence:S,overlaying:a.overlaying,overlayingNow:()=>g[y()]==="overlay",requestCollapse:()=>a.setValue("closed","toggle"),requestToggle:()=>a.toggle("toggle")}),{handles:v,content:re}=B(K,b),se=m&&a.value!=="closed"&&!a.overlaying?e.createElement(E.Provider,{value:oe},v.length>0?v:e.createElement(T,null)):null,R=a.peeking?`var(--sidebar-size, ${o}px)`:void 0,C=N(f,P,s,d);return e.createElement("div",{...U(c),role:c.role??"navigation",id:a.id,ref:ie,className:pe("kui-ShellPane","kui-ShellSidebar",r),...k(a,ne),"data-inset":h||void 0,tabIndex:a.overlaying?-1:c.tabIndex,style:{...J,"--sidebar-expanded-size":`${o}px`,...C?{"--sidebar-size":C}:{},"--sidebar-min-size":`${s}px`,"--sidebar-max-size":`${d}px`,...R?{"--peek-sidebar-width":R}:{}}},e.createElement("div",{className:"kui-ShellSidebarContent"},e.createElement(x,null,re)),se)});O.displayName="Shell.Sidebar";O.Handle=b;export{O as a};
|
|
3
|
+
//# sourceMappingURL=chunk-AS2STDGA.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{a as X,b as oo,c as eo,e as W,f as to,i as ro,l as no}from"./chunk-67UEMB4K.js";import{a as B}from"./chunk-KJZSXLIX.js";import{a as Q}from"./chunk-4MNRLB57.js";import{a as q}from"./chunk-7N2Q5WOM.js";import{h as J}from"./chunk-
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
import{a as X,b as oo,c as eo,e as W,f as to,i as ro,l as no}from"./chunk-67UEMB4K.js";import{a as B}from"./chunk-KJZSXLIX.js";import{a as Q}from"./chunk-4MNRLB57.js";import{a as q}from"./chunk-7N2Q5WOM.js";import{h as J}from"./chunk-MJROOEPE.js";import{c as U}from"./chunk-OKQAVYW4.js";import{b as L}from"./chunk-5ON3XLRD.js";import*as o from"react";import{useLayoutEffect as D}from"radix-ui/internal";import x from"classnames";import{Toolbar as N}from"radix-ui";var bo=["1","2","3","4"],To=["horizontal","vertical"],g={size:{type:"enum",className:"kui-r-size",values:bo,default:"2"},orientation:{type:"enum",values:To,default:"horizontal"}};var E=o.createContext(null),F=o.createContext(null),M=o.createContext(!1);function Io(){return o.useContext(M)}var H=o.forwardRef((e,t)=>{let r=J(),a=L(e.size??r??void 0,g.size),s=e.orientation??g.orientation.default,{className:i,orientation:n,backdrop:l=!1,children:u,...d}=U({...e,size:a},g,q),p=o.useMemo(()=>({size:a,orientation:s,backdrop:l}),[a,s,l]);return o.createElement(N.Root,{...d,ref:t,orientation:s,"data-backdrop":l||void 0,className:x("kui-Toolbar",i)},o.createElement(E.Provider,{value:p},u))});H.displayName="Toolbar";var so=o.forwardRef(({className:e,disabled:t=!1,children:r,...a},s)=>{let i=o.useContext(E),n=o.useContext(M),l=o.useMemo(()=>({disabled:t}),[t]);return n?o.createElement(to,{...a,ref:s,className:e},o.createElement(F.Provider,{value:l},r)):o.createElement("div",{role:"group","data-orientation":i?.orientation??"horizontal","data-disabled":t||void 0,...a,ref:s,className:x("kui-ToolbarGroup",e)},o.createElement(F.Provider,{value:l},r))});so.displayName="Toolbar.Group";var mo=new Set(["id","className","style","title"]);function ao(e){return e===!0||e==="true"}function Po(e){return o.isValidElement(e)&&e.type==="button"}var A=o.forwardRef((e,t)=>{let r=o.useContext(E),a=o.useContext(F),s=o.useContext(M),{iconOnly:i,size:n,variant:l,emphasis:u,color:d,disabled:p,asChild:v,onKeyDown:y,...w}=e,h=p||a?.disabled||void 0;if(s){let T={};for(let m of Object.keys(w))(/^on[A-Z]/.test(m)||m.startsWith("aria-")||m.startsWith("data-")||mo.has(m))&&(T[m]=w[m]);return y&&(T.onKeyDown=y),o.createElement(io,{...T,ref:t,asChild:v,iconOnly:i,disabled:h,color:d,pressed:e["aria-pressed"]===void 0?void 0:ao(e["aria-pressed"])},w.children)}let O=r?.orientation==="vertical"&&y?T=>{T.key==="ArrowDown"||T.key==="ArrowUp"||y(T)}:y,I=ao(e["aria-pressed"]),c="data-state"in e||e["aria-pressed"]===void 0?{}:{"data-state":I?"on":"off"},f={size:n??r?.size,...u!==void 0?{emphasis:u}:{variant:l??(a?"ghost":r?.backdrop?"raised":"soft")},color:d??(l||u?void 0:"gray"),...c},b={...w,...i?{iconOnly:!0}:{},...v?{asChild:!0}:{},...O?{onKeyDown:O}:{},...f};return r?v&&!Po(w.children)?o.createElement(N.Link,{asChild:!0,ref:t},o.createElement(B,{...b,disabled:h})):o.createElement(N.Button,{asChild:!0,ref:t,disabled:h},o.createElement(B,{...b})):o.createElement(B,{...b,ref:t,disabled:h})});A.displayName="Toolbar.Button";var io=o.forwardRef(({asChild:e,iconOnly:t,disabled:r,color:a,pressed:s,children:i,"aria-label":n,...l},u)=>{let d=t?n:void 0,p={...l,...t?{}:n?{"aria-label":n}:{},disabled:r,...a?{color:a}:{}};if(e&&o.isValidElement(i)){let v=d?o.cloneElement(i,void 0,i.props.children,o.createElement("span",null,d)):i;return o.createElement(W,{...p,ref:u,asChild:!0},v)}return s!==void 0?o.createElement(ro,{...p,ref:u,checked:s},i,d):o.createElement(W,{...p,ref:u},i,d)});io.displayName="Toolbar.OverflowItem";function Ro(){return o.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentcolor","aria-hidden":!0,xmlns:"http://www.w3.org/2000/svg"},o.createElement("circle",{cx:"3.25",cy:"8",r:"1.25"}),o.createElement("circle",{cx:"8",cy:"8",r:"1.25"}),o.createElement("circle",{cx:"12.75",cy:"8",r:"1.25"}))}var lo=o.forwardRef(({label:e="More",className:t,children:r,...a},s)=>{let i=o.Children.toArray(r),n=i.length,l=o.useRef(null),u=o.useRef([]),d=o.useRef(0),[p,v]=o.useState(n),[y,w]=o.useState(0),[h,O]=o.useState(n);h!==n&&(O(n),v(n)),D(()=>{u.current=[]},[n]),D(()=>{let c=l.current;if(!c)return;let f=Array.from(c.children),b=Math.min(p,n);for(let P=0;P<b;P++){let R=f[P];R&&(u.current[P]=R.offsetWidth)}let T=f[b];T&&(d.current=T.offsetWidth);let m=Number.parseFloat(getComputedStyle(c).columnGap)||0,K=c.clientWidth,V=0,_=0;for(let P=0;P<n;P++){let R=u.current[P];if(R===void 0)return;R!==0&&(V+=R+(_>0?m:0),_+=1)}let k=n;if(V>K){let P=K-(d.current||c.clientHeight)-m,R=0,Y=0;k=0;for(let G=0;G<n;G++){let Z=u.current[G];if(Z>0){let $=Z+(Y>0?m:0);if(R+$>P)break;R+=$,Y+=1}k+=1}}k!==p&&v(k)},[p,n,y]),o.useEffect(()=>{let c=l.current;if(!c||typeof ResizeObserver>"u")return;let f=new ResizeObserver(()=>w(b=>b+1));f.observe(c);for(let b of Array.from(c.children))f.observe(b);return()=>f.disconnect()},[p,n]);let I=o.useCallback(c=>{l.current=c,typeof s=="function"?s(c):s&&(s.current=c)},[s]);return o.createElement("div",{...a,ref:I,className:x("kui-ToolbarOverflow",t)},i.slice(0,p).map((c,f)=>o.createElement("div",{key:f,className:"kui-ToolbarOverflowSeat"},c)),p<n?o.createElement(X,null,o.createElement(oo,null,o.createElement(A,{iconOnly:!0,"aria-label":e},o.createElement(Ro,null))),o.createElement(eo,{align:"end"},o.createElement(M.Provider,{value:!0},i.slice(p)))):null)});lo.displayName="Toolbar.Overflow";var j=[],S=new Map,z=new Set,C=new Map;function vo(e){return z.add(e),()=>{z.delete(e)}}function yo(e,t,r){let a=S.get(e)??j,i=a.findIndex(n=>n.id===t)===-1?[...a,{id:t,node:r}]:a.map(n=>n.id===t?{id:t,node:r}:n);S.set(e,i),z.forEach(n=>n())}function wo(e,t){let r=S.get(e);if(!r)return;let a=r.filter(s=>s.id!==t);a.length===0?S.delete(e):S.set(e,a),z.forEach(s=>s())}function co({name:e="default"}){D(()=>{let r=(C.get(e)??0)+1;return C.set(e,r),r>1,()=>{let a=(C.get(e)??1)-1;a>0?C.set(e,a):C.delete(e)}},[e]);let t=o.useSyncExternalStore(vo,()=>S.get(e)??j,()=>j);return o.createElement(o.Fragment,null,t.map(r=>o.createElement(o.Fragment,{key:r.id},r.node)))}co.displayName="Toolbar.Slot";function po({name:e="default",children:t}){let r=o.useId();return D(()=>{yo(e,r,t)},[e,r,t]),D(()=>()=>wo(e,r),[e,r]),null}po.displayName="Toolbar.Fill";var uo=o.forwardRef(({className:e,...t},r)=>{let a=o.useContext(E);return o.useContext(M)?o.createElement(no,{...t,ref:r,className:e}):a?o.createElement(N.Separator,{...t,ref:r,className:x("kui-ToolbarSeparator",e)}):o.createElement("div",{role:"separator","aria-orientation":"vertical","data-orientation":"vertical",...t,ref:r,className:x("kui-ToolbarSeparator",e)})});uo.displayName="Toolbar.Separator";var ho={1:"2",2:"3",3:"4",4:"5"},fo=o.forwardRef(({className:e,children:t,style:r,id:a},s)=>{let i=o.useContext(E),n=L(void 0,g.size),l=i?.size??n;return t==null||t===!1?null:o.createElement(Q,{ref:s,as:"span",size:ho[l],weight:"medium",truncate:!0,id:a,style:r,className:x("kui-ToolbarTitle",e)},t)});fo.displayName="Toolbar.Title";var Go=Object.assign(H,{Root:H,Group:so,Button:A,Separator:uo,Title:fo,Overflow:lo,Slot:co,Fill:po});export{Io as a,H as b,so as c,A as d,lo as e,co as f,po as g,uo as h,fo as i,Go as j};
|
|
3
|
+
//# sourceMappingURL=chunk-JTMLFTNZ.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{a as d}from"./chunk-MGWGD6KI.js";import{b as p}from"./chunk-QEDKL23P.js";import{a as s}from"./chunk-ANQLWGFN.js";import{j as C}from"./chunk-GHWEXMF6.js";import*as e from"react";import c from"classnames";var v=e.createContext(null);function u(){return e.useContext(v)}var S=e.createContext("2"),B=e.createContext(!1),N=e.createContext(!1);function W({children:t,presentation:n}){let a=e.useContext(S),o=e.useMemo(()=>({size:a,menuVariant:"soft",presentation:n}),[a,n]);return e.createElement(v.Provider,{value:o},t)}function P(){let t=u(),n=e.useContext(S),a=t?.size??n,o=t?.menuVariant??"soft";return["kui-ShellPaneChrome",`kui-r-size-${a}`,`kui-menu-variant-${o}`]}var H={1:"2",2:"3",3:"4",4:"4"};function f(){let t=u(),n=e.useContext(S);return H[t?.size??n]}function g(){let t=e.useContext(s),n=e.useContext(C)!==null,a=f();return t!==void 0?t:n?a:null}var y=e.forwardRef(({className:t,float:n,children:a,...o},i)=>{let l=P(),r=f();return e.createElement("div",{...o,ref:i,"data-float":n||void 0,className:c("kui-ShellPaneHeader","kui-SidebarHeader","kui-SidebarHeader--container",...l,t)},e.createElement(s.Provider,{value:r},a))});y.displayName="Shell.PaneHeader";var F=e.forwardRef(({className:t,float:n,children:a,...o},i)=>{let l=P(),r=f();return e.createElement("div",{...o,ref:i,"data-float":n||void 0,className:c("kui-ShellPaneFooter","kui-SidebarFooter","kui-SidebarFooter--container",...l,t)},e.createElement(s.Provider,{value:r},a))});F.displayName="Shell.PaneFooter";var M=e.forwardRef(({className:t,style:n,dir:a,children:o,fade:i=!1,pane:l=!1,...r},m)=>{let x=P(),h=e.useContext(B),R=u(),z=h&&R===null&&!l,b=e.useContext(N),V=p();if(z){let k=r.tabIndex??(b&&V?-1:void 0);return e.createElement(d,{...r,tabIndex:k,ref:m,type:"hover",fade:i,className:"kui-ShellScroll"},e.createElement("div",{style:n,dir:a,className:c("kui-ShellScrollContent",t)},o))}return e.createElement(d,{...r,ref:m,type:"hover",fade:i,className:"kui-ShellScroll"},e.createElement("div",{style:n,dir:a,className:c("kui-BaseMenuContent","kui-SidebarContent",...x,t)},e.createElement(s.Provider,{value:null},e.createElement("div",{className:"kui-BaseMenuViewport"},o))))});M.displayName="Shell.Scroll";export{v as a,u as b,S as c,B as d,N as e,W as f,H as g,g as h,y as i,F as j,M as k};
|
|
3
|
+
//# sourceMappingURL=chunk-MJROOEPE.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/components/_internal/pane-chrome.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client';\n\n/**\n * A pane's own chrome: a header row, a scrolling region and a footer row.\n *\n * Shell.Sidebar and Shell.Panel render these as `Shell.PaneHeader`, `Shell.Scroll` and\n * `Shell.PaneFooter`. The pane renders anything; with these parts it is the presentation, so\n * Sidebar's menu parts work inside it with no `Sidebar.Root`. The index comes from the nearest\n * Shell (`Shell.Root size`), or from a deprecated `Sidebar.Root` that still wraps them.\n */\n\nimport * as React from 'react';\nimport classNames from 'classnames';\n\nimport { ScrollArea } from '../scroll-area.js';\nimport { ShellStoreContext } from './shell-store.js';\nimport { PaneBandSizeContext, type BandSize } from './pane-band-context.js';\nimport { usePageScrollMedia } from './shell-page-scroll.js';\n\ntype PaneSize = '1' | '2' | '3';\n\ntype SidebarVisualContextValue = {\n size: PaneSize;\n menuVariant: 'solid' | 'soft';\n presentation?: 'thin' | 'expanded';\n color?: string;\n};\n\n/** Size, menu highlight and presentation for the Sidebar parts. Internal: not exported. */\nconst SidebarVisualContext = React.createContext<SidebarVisualContextValue | null>(null);\n\nfunction useSidebarVisual() {\n return React.useContext(SidebarVisualContext);\n}\n\n/** The Shell's index. `Shell.Root size` sets it; panes hand it to their chrome. */\nconst ShellSizeContext = React.createContext<PaneSize>('2');\n\n/**\n * True inside `Shell.Content`. `Shell.Root` sets it back to false, so a Shell nested in the\n * content gets pane chrome in its own panes. Read by `Shell.Scroll`: in the content it holds a\n * page, not a menu, so it takes none of the menu's padding, gap or layering.\n */\nconst ShellContentContext = React.createContext(false);\n\n/**\n * True inside a window Shell: one with no `contained` and no `height`, which lets the page scroll\n * on a narrow touch screen. Each `Shell.Root` sets its own, so a Shell nested in another answers\n * for itself.\n */\nconst ShellWindowContext = React.createContext(false);\n\n/**\n * Gives a Shell pane's children the Shell's index, so Sidebar parts size themselves. In a Rail\n * the rows are `thin`: icon tiles with a small label, sub-menus as dropdowns.\n */\nfunction PaneChromeScope({ children, presentation }: { children: React.ReactNode; presentation?: 'thin' }) {\n const size = React.useContext(ShellSizeContext);\n const value = React.useMemo<SidebarVisualContextValue>(() => ({ size, menuVariant: 'soft', presentation }), [size, presentation]);\n return <SidebarVisualContext.Provider value={value}>{children}</SidebarVisualContext.Provider>;\n}\n\nfunction useChromeClasses() {\n const visual = useSidebarVisual();\n // A pane with no scope (Inspector, Bottom) still takes the Shell's index.\n const shellSize = React.useContext(ShellSizeContext);\n const size = visual?.size ?? shellSize;\n const menuVariant = visual?.menuVariant ?? 'soft';\n return ['kui-ShellPaneChrome', `kui-r-size-${size}`, `kui-menu-variant-${menuVariant}`];\n}\n\n/**\n * The index a Toolbar in a pane's header or footer rests at when it states none: one step above\n * the Shell's, so the band reads as chrome over the rows (v2 BAND_STEP). 4 has no step above.\n */\nconst BAND_STEP = { '1': '2', '2': '3', '3': '4', '4': '4' } as const satisfies Record<BandSize, BandSize>;\n\nfunction useBandSize(): BandSize {\n const visual = useSidebarVisual();\n const shellSize = React.useContext(ShellSizeContext);\n return BAND_STEP[visual?.size ?? shellSize];\n}\n\n/**\n * The size a Toolbar with no `size` of its own rests at, or null for none.\n *\n * In a pane's header or footer it is that band's size. Anywhere else inside a Shell, such as\n * `Shell.Content` or a pane's body, it is the same step: one above the Shell's index, so a\n * toolbar in the content area matches the ones in the pane headers beside it (v2 sizes every\n * toolbar this way). A pane's scrolling list, and anything outside a Shell, has none.\n */\nfunction usePaneBandSize(): BandSize | null {\n const band = React.useContext(PaneBandSizeContext);\n const inShell = React.useContext(ShellStoreContext) !== null;\n const step = useBandSize();\n if (band !== undefined) return band;\n return inShell ? step : null;\n}\n\ninterface PaneHeaderProps extends React.ComponentPropsWithoutRef<'div'> {\n /**\n * Floats the row over the top of `Shell.Scroll`, so the list scrolls behind it. The list\n * starts below the row, and `Shell.Scroll fade` fades it out under the row. The row paints\n * nothing and lets clicks through between its controls; a `Toolbar backdrop` in it keeps\n * the controls readable.\n */\n float?: boolean;\n}\n\n/** A pane's header row, pinned above its scrolling region. */\nconst PaneHeader = React.forwardRef<HTMLDivElement, PaneHeaderProps>(({ className, float, children, ...props }, forwardedRef) => {\n const chrome = useChromeClasses();\n const band = useBandSize();\n return (\n <div\n {...props}\n ref={forwardedRef}\n data-float={float || undefined}\n className={classNames('kui-ShellPaneHeader', 'kui-SidebarHeader', 'kui-SidebarHeader--container', ...chrome, className)}\n >\n <PaneBandSizeContext.Provider value={band}>{children}</PaneBandSizeContext.Provider>\n </div>\n );\n});\nPaneHeader.displayName = 'Shell.PaneHeader';\n\ninterface PaneFooterProps extends React.ComponentPropsWithoutRef<'div'> {\n /** Floats the row over the bottom of `Shell.Scroll`, the way `Shell.PaneHeader float` does at the top. */\n float?: boolean;\n}\n\n/** A pane's footer row, pinned below its scrolling region. */\nconst PaneFooter = React.forwardRef<HTMLDivElement, PaneFooterProps>(({ className, float, children, ...props }, forwardedRef) => {\n const chrome = useChromeClasses();\n const band = useBandSize();\n return (\n <div\n {...props}\n ref={forwardedRef}\n data-float={float || undefined}\n className={classNames('kui-ShellPaneFooter', 'kui-SidebarFooter', 'kui-SidebarFooter--container', ...chrome, className)}\n >\n <PaneBandSizeContext.Provider value={band}>{children}</PaneBandSizeContext.Provider>\n </div>\n );\n});\nPaneFooter.displayName = 'Shell.PaneFooter';\n\ninterface ScrollProps extends React.ComponentPropsWithoutRef<'div'> {\n /** Fades the list out toward an edge with more past it, and under a floating header or footer. */\n fade?: boolean;\n}\n\n/**\n * The one region of a pane that scrolls; it takes the room the header and footer leave.\n * In `Shell.Content` it is the page's scroller, and a `Shell.PaneHeader float` beside it pins\n * the page's toolbar over it. The ref, events and ARIA props land on the element that scrolls;\n * `className`, `style` and `dir` apply to the content inside it. In a Rail, Panel or Sidebar the pane is\n * already a navigation landmark, so it needs no role of its own.\n */\nconst Scroll = React.forwardRef<HTMLDivElement, ScrollProps>(({ className, style, dir, children, fade = false, ...props }, forwardedRef) => {\n const chrome = useChromeClasses();\n // A Sidebar.Root inside the content still gets a menu.\n const contentPane = React.useContext(ShellContentContext);\n const visual = useSidebarVisual();\n const inContent = contentPane && visual === null;\n // While the page scrolls, the content's viewport scrolls nothing: as a tab stop it would take a\n // Tab, ring the whole page and move nothing. Resolved after mount; a `tabIndex` of the caller's wins.\n const windowShell = React.useContext(ShellWindowContext);\n const pageScrolls = usePageScrollMedia();\n if (inContent) {\n const tabIndex = props.tabIndex ?? (windowShell && pageScrolls ? -1 : undefined);\n return (\n <ScrollArea {...props} tabIndex={tabIndex} ref={forwardedRef} type=\"hover\" fade={fade} className=\"kui-ShellScroll\">\n <div style={style} dir={dir} className={classNames('kui-ShellScrollContent', className)}>\n {children}\n </div>\n </ScrollArea>\n );\n }\n return (\n <ScrollArea {...props} ref={forwardedRef} type=\"hover\" fade={fade} className=\"kui-ShellScroll\">\n <div style={style} dir={dir} className={classNames('kui-BaseMenuContent', 'kui-SidebarContent', ...chrome, className)}>\n {/* A header's band does not reach a Toolbar in the scrolling list. */}\n <PaneBandSizeContext.Provider value={null}>\n <div className=\"kui-BaseMenuViewport\">{children}</div>\n </PaneBandSizeContext.Provider>\n </div>\n </ScrollArea>\n );\n});\nScroll.displayName = 'Shell.Scroll';\n\nexport { SidebarVisualContext, useSidebarVisual, ShellSizeContext, ShellContentContext, ShellWindowContext, PaneChromeScope, PaneHeader, PaneFooter, Scroll, BAND_STEP, usePaneBandSize };\nexport type { SidebarVisualContextValue, PaneSize, BandSize, PaneHeaderProps, PaneFooterProps, ScrollProps };\n"],
|
|
5
|
-
"mappings": ";gKAWA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aAiBvB,IAAMC,EAA6B,gBAAgD,IAAI,EAEvF,SAASC,GAAmB,CAC1B,OAAa,aAAWD,CAAoB,CAC9C,CAGA,IAAME,EAAyB,gBAAwB,GAAG,EAOpDC,EAA4B,gBAAc,EAAK,EAO/CC,EAA2B,gBAAc,EAAK,EAMpD,SAASC,EAAgB,CAAE,SAAAC,EAAU,aAAAC,CAAa,EAAyD,CACzG,IAAMC,EAAa,aAAWN,CAAgB,EACxCO,EAAc,UAAmC,KAAO,CAAE,KAAAD,EAAM,YAAa,OAAQ,aAAAD,CAAa,GAAI,CAACC,EAAMD,CAAY,CAAC,EAChI,OAAO,gBAACP,EAAqB,SAArB,CAA8B,MAAOS,GAAQH,CAAS,CAChE,CAEA,SAASI,GAAmB,CAC1B,IAAMC,EAASV,EAAiB,EAE1BW,EAAkB,aAAWV,CAAgB,EAC7CM,EAAOG,GAAQ,MAAQC,EACvBC,EAAcF,GAAQ,aAAe,OAC3C,MAAO,CAAC,sBAAuB,cAAcH,CAAI,GAAI,oBAAoBK,CAAW,EAAE,CACxF,CAMA,IAAMC,EAAY,CAAE,EAAK,IAAK,EAAK,IAAK,EAAK,IAAK,EAAK,GAAI,EAE3D,SAASC,GAAwB,CAC/B,IAAMJ,EAASV,EAAiB,EAC1BW,EAAkB,aAAWV,CAAgB,EACnD,OAAOY,EAAUH,GAAQ,MAAQC,CAAS,CAC5C,CAUA,SAASI,GAAmC,CAC1C,IAAMC,EAAa,aAAWC,CAAmB,EAC3CC,EAAgB,aAAWC,CAAiB,IAAM,KAClDC,EAAON,EAAY,EACzB,OAAIE,IAAS,OAAkBA,EACxBE,EAAUE,EAAO,IAC1B,CAaA,IAAMC,EAAmB,aAA4C,CAAC,CAAE,UAAAC,EAAW,MAAAC,EAAO,SAAAlB,EAAU,GAAGmB,CAAM,EAAGC,IAAiB,CAC/H,IAAMC,EAASjB,EAAiB,EAC1BO,EAAOF,EAAY,EACzB,OACE,gBAAC,OACE,GAAGU,EACJ,IAAKC,EACL,aAAYF,GAAS,OACrB,UAAWI,EAAW,sBAAuB,oBAAqB,+BAAgC,GAAGD,EAAQJ,CAAS,GAEtH,gBAACL,EAAoB,SAApB,CAA6B,MAAOD,GAAOX,CAAS,CACvD,CAEJ,CAAC,EACDgB,EAAW,YAAc,mBAQzB,IAAMO,EAAmB,aAA4C,CAAC,CAAE,UAAAN,EAAW,MAAAC,EAAO,SAAAlB,EAAU,GAAGmB,CAAM,EAAGC,IAAiB,CAC/H,IAAMC,EAASjB,EAAiB,EAC1BO,EAAOF,EAAY,EACzB,OACE,gBAAC,OACE,GAAGU,EACJ,IAAKC,EACL,aAAYF,GAAS,OACrB,UAAWI,EAAW,sBAAuB,oBAAqB,+BAAgC,GAAGD,EAAQJ,CAAS,GAEtH,gBAACL,EAAoB,SAApB,CAA6B,MAAOD,GAAOX,CAAS,CACvD,CAEJ,CAAC,EACDuB,EAAW,YAAc,
|
|
6
|
-
"names": ["React", "classNames", "SidebarVisualContext", "useSidebarVisual", "ShellSizeContext", "ShellContentContext", "ShellWindowContext", "PaneChromeScope", "children", "presentation", "size", "value", "useChromeClasses", "visual", "shellSize", "menuVariant", "BAND_STEP", "useBandSize", "usePaneBandSize", "band", "PaneBandSizeContext", "inShell", "ShellStoreContext", "step", "PaneHeader", "className", "float", "props", "forwardedRef", "chrome", "classNames", "PaneFooter", "Scroll", "style", "dir", "fade", "contentPane", "inContent", "windowShell", "pageScrolls", "usePageScrollMedia", "tabIndex", "ScrollArea"]
|
|
4
|
+
"sourcesContent": ["'use client';\n\n/**\n * A pane's own chrome: a header row, a scrolling region and a footer row.\n *\n * Shell.Sidebar and Shell.Panel render these as `Shell.PaneHeader`, `Shell.Scroll` and\n * `Shell.PaneFooter`. The pane renders anything; with these parts it is the presentation, so\n * Sidebar's menu parts work inside it with no `Sidebar.Root`. The index comes from the nearest\n * Shell (`Shell.Root size`), or from a deprecated `Sidebar.Root` that still wraps them.\n */\n\nimport * as React from 'react';\nimport classNames from 'classnames';\n\nimport { ScrollArea } from '../scroll-area.js';\nimport { ShellStoreContext } from './shell-store.js';\nimport { PaneBandSizeContext, type BandSize } from './pane-band-context.js';\nimport { usePageScrollMedia } from './shell-page-scroll.js';\n\ntype PaneSize = '1' | '2' | '3';\n\ntype SidebarVisualContextValue = {\n size: PaneSize;\n menuVariant: 'solid' | 'soft';\n presentation?: 'thin' | 'expanded';\n color?: string;\n};\n\n/** Size, menu highlight and presentation for the Sidebar parts. Internal: not exported. */\nconst SidebarVisualContext = React.createContext<SidebarVisualContextValue | null>(null);\n\nfunction useSidebarVisual() {\n return React.useContext(SidebarVisualContext);\n}\n\n/** The Shell's index. `Shell.Root size` sets it; panes hand it to their chrome. */\nconst ShellSizeContext = React.createContext<PaneSize>('2');\n\n/**\n * True inside `Shell.Content`. `Shell.Root` sets it back to false, so a Shell nested in the\n * content gets pane chrome in its own panes. Read by `Shell.Scroll`: in the content it holds a\n * page, not a menu, so it takes none of the menu's padding, gap or layering.\n */\nconst ShellContentContext = React.createContext(false);\n\n/**\n * True inside a window Shell: one with no `contained` and no `height`, which lets the page scroll\n * on a narrow touch screen. Each `Shell.Root` sets its own, so a Shell nested in another answers\n * for itself.\n */\nconst ShellWindowContext = React.createContext(false);\n\n/**\n * Gives a Shell pane's children the Shell's index, so Sidebar parts size themselves. In a Rail\n * the rows are `thin`: icon tiles with a small label, sub-menus as dropdowns.\n */\nfunction PaneChromeScope({ children, presentation }: { children: React.ReactNode; presentation?: 'thin' }) {\n const size = React.useContext(ShellSizeContext);\n const value = React.useMemo<SidebarVisualContextValue>(() => ({ size, menuVariant: 'soft', presentation }), [size, presentation]);\n return <SidebarVisualContext.Provider value={value}>{children}</SidebarVisualContext.Provider>;\n}\n\nfunction useChromeClasses() {\n const visual = useSidebarVisual();\n // A pane with no scope (Inspector, Bottom) still takes the Shell's index.\n const shellSize = React.useContext(ShellSizeContext);\n const size = visual?.size ?? shellSize;\n const menuVariant = visual?.menuVariant ?? 'soft';\n return ['kui-ShellPaneChrome', `kui-r-size-${size}`, `kui-menu-variant-${menuVariant}`];\n}\n\n/**\n * The index a Toolbar in a pane's header or footer rests at when it states none: one step above\n * the Shell's, so the band reads as chrome over the rows (v2 BAND_STEP). 4 has no step above.\n */\nconst BAND_STEP = { '1': '2', '2': '3', '3': '4', '4': '4' } as const satisfies Record<BandSize, BandSize>;\n\nfunction useBandSize(): BandSize {\n const visual = useSidebarVisual();\n const shellSize = React.useContext(ShellSizeContext);\n return BAND_STEP[visual?.size ?? shellSize];\n}\n\n/**\n * The size a Toolbar with no `size` of its own rests at, or null for none.\n *\n * In a pane's header or footer it is that band's size. Anywhere else inside a Shell, such as\n * `Shell.Content` or a pane's body, it is the same step: one above the Shell's index, so a\n * toolbar in the content area matches the ones in the pane headers beside it (v2 sizes every\n * toolbar this way). A pane's scrolling list, and anything outside a Shell, has none.\n */\nfunction usePaneBandSize(): BandSize | null {\n const band = React.useContext(PaneBandSizeContext);\n const inShell = React.useContext(ShellStoreContext) !== null;\n const step = useBandSize();\n if (band !== undefined) return band;\n return inShell ? step : null;\n}\n\ninterface PaneHeaderProps extends React.ComponentPropsWithoutRef<'div'> {\n /**\n * Floats the row over the top of `Shell.Scroll`, so the list scrolls behind it. The list\n * starts below the row, and `Shell.Scroll fade` fades it out under the row. The row paints\n * nothing and lets clicks through between its controls; a `Toolbar backdrop` in it keeps\n * the controls readable.\n */\n float?: boolean;\n}\n\n/** A pane's header row, pinned above its scrolling region. */\nconst PaneHeader = React.forwardRef<HTMLDivElement, PaneHeaderProps>(({ className, float, children, ...props }, forwardedRef) => {\n const chrome = useChromeClasses();\n const band = useBandSize();\n return (\n <div\n {...props}\n ref={forwardedRef}\n data-float={float || undefined}\n className={classNames('kui-ShellPaneHeader', 'kui-SidebarHeader', 'kui-SidebarHeader--container', ...chrome, className)}\n >\n <PaneBandSizeContext.Provider value={band}>{children}</PaneBandSizeContext.Provider>\n </div>\n );\n});\nPaneHeader.displayName = 'Shell.PaneHeader';\n\ninterface PaneFooterProps extends React.ComponentPropsWithoutRef<'div'> {\n /** Floats the row over the bottom of `Shell.Scroll`, the way `Shell.PaneHeader float` does at the top. */\n float?: boolean;\n}\n\n/** A pane's footer row, pinned below its scrolling region. */\nconst PaneFooter = React.forwardRef<HTMLDivElement, PaneFooterProps>(({ className, float, children, ...props }, forwardedRef) => {\n const chrome = useChromeClasses();\n const band = useBandSize();\n return (\n <div\n {...props}\n ref={forwardedRef}\n data-float={float || undefined}\n className={classNames('kui-ShellPaneFooter', 'kui-SidebarFooter', 'kui-SidebarFooter--container', ...chrome, className)}\n >\n <PaneBandSizeContext.Provider value={band}>{children}</PaneBandSizeContext.Provider>\n </div>\n );\n});\nPaneFooter.displayName = 'Shell.PaneFooter';\n\ninterface ScrollProps extends React.ComponentPropsWithoutRef<'div'> {\n /** Fades the list out toward an edge with more past it, and under a floating header or footer. */\n fade?: boolean;\n /**\n * Keeps the pane's list (its menu rows) when React puts this under `Shell.Content`, as when an\n * app renders a pane's content in its page and portals it into `Shell.Panel`. In a Rail, Panel\n * or Sidebar it is already the pane's list.\n */\n pane?: boolean;\n}\n\n/**\n * The one region of a pane that scrolls; it takes the room the header and footer leave.\n * In `Shell.Content` it is the page's scroller, and a `Shell.PaneHeader float` beside it pins\n * the page's toolbar over it. The ref, events and ARIA props land on the element that scrolls;\n * `className`, `style` and `dir` apply to the content inside it. In a Rail, Panel or Sidebar the pane is\n * already a navigation landmark, so it needs no role of its own.\n */\nconst Scroll = React.forwardRef<HTMLDivElement, ScrollProps>(({ className, style, dir, children, fade = false, pane = false, ...props }, forwardedRef) => {\n const chrome = useChromeClasses();\n // A Sidebar.Root inside the content still gets a menu.\n const contentPane = React.useContext(ShellContentContext);\n const visual = useSidebarVisual();\n const inContent = contentPane && visual === null && !pane;\n // While the page scrolls, the content's viewport scrolls nothing: as a tab stop it would take a\n // Tab, ring the whole page and move nothing. Resolved after mount; a `tabIndex` of the caller's wins.\n const windowShell = React.useContext(ShellWindowContext);\n const pageScrolls = usePageScrollMedia();\n if (inContent) {\n const tabIndex = props.tabIndex ?? (windowShell && pageScrolls ? -1 : undefined);\n return (\n <ScrollArea {...props} tabIndex={tabIndex} ref={forwardedRef} type=\"hover\" fade={fade} className=\"kui-ShellScroll\">\n <div style={style} dir={dir} className={classNames('kui-ShellScrollContent', className)}>\n {children}\n </div>\n </ScrollArea>\n );\n }\n return (\n <ScrollArea {...props} ref={forwardedRef} type=\"hover\" fade={fade} className=\"kui-ShellScroll\">\n <div style={style} dir={dir} className={classNames('kui-BaseMenuContent', 'kui-SidebarContent', ...chrome, className)}>\n {/* A header's band does not reach a Toolbar in the scrolling list. */}\n <PaneBandSizeContext.Provider value={null}>\n <div className=\"kui-BaseMenuViewport\">{children}</div>\n </PaneBandSizeContext.Provider>\n </div>\n </ScrollArea>\n );\n});\nScroll.displayName = 'Shell.Scroll';\n\nexport { SidebarVisualContext, useSidebarVisual, ShellSizeContext, ShellContentContext, ShellWindowContext, PaneChromeScope, PaneHeader, PaneFooter, Scroll, BAND_STEP, usePaneBandSize };\nexport type { SidebarVisualContextValue, PaneSize, BandSize, PaneHeaderProps, PaneFooterProps, ScrollProps };\n"],
|
|
5
|
+
"mappings": ";gKAWA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aAiBvB,IAAMC,EAA6B,gBAAgD,IAAI,EAEvF,SAASC,GAAmB,CAC1B,OAAa,aAAWD,CAAoB,CAC9C,CAGA,IAAME,EAAyB,gBAAwB,GAAG,EAOpDC,EAA4B,gBAAc,EAAK,EAO/CC,EAA2B,gBAAc,EAAK,EAMpD,SAASC,EAAgB,CAAE,SAAAC,EAAU,aAAAC,CAAa,EAAyD,CACzG,IAAMC,EAAa,aAAWN,CAAgB,EACxCO,EAAc,UAAmC,KAAO,CAAE,KAAAD,EAAM,YAAa,OAAQ,aAAAD,CAAa,GAAI,CAACC,EAAMD,CAAY,CAAC,EAChI,OAAO,gBAACP,EAAqB,SAArB,CAA8B,MAAOS,GAAQH,CAAS,CAChE,CAEA,SAASI,GAAmB,CAC1B,IAAMC,EAASV,EAAiB,EAE1BW,EAAkB,aAAWV,CAAgB,EAC7CM,EAAOG,GAAQ,MAAQC,EACvBC,EAAcF,GAAQ,aAAe,OAC3C,MAAO,CAAC,sBAAuB,cAAcH,CAAI,GAAI,oBAAoBK,CAAW,EAAE,CACxF,CAMA,IAAMC,EAAY,CAAE,EAAK,IAAK,EAAK,IAAK,EAAK,IAAK,EAAK,GAAI,EAE3D,SAASC,GAAwB,CAC/B,IAAMJ,EAASV,EAAiB,EAC1BW,EAAkB,aAAWV,CAAgB,EACnD,OAAOY,EAAUH,GAAQ,MAAQC,CAAS,CAC5C,CAUA,SAASI,GAAmC,CAC1C,IAAMC,EAAa,aAAWC,CAAmB,EAC3CC,EAAgB,aAAWC,CAAiB,IAAM,KAClDC,EAAON,EAAY,EACzB,OAAIE,IAAS,OAAkBA,EACxBE,EAAUE,EAAO,IAC1B,CAaA,IAAMC,EAAmB,aAA4C,CAAC,CAAE,UAAAC,EAAW,MAAAC,EAAO,SAAAlB,EAAU,GAAGmB,CAAM,EAAGC,IAAiB,CAC/H,IAAMC,EAASjB,EAAiB,EAC1BO,EAAOF,EAAY,EACzB,OACE,gBAAC,OACE,GAAGU,EACJ,IAAKC,EACL,aAAYF,GAAS,OACrB,UAAWI,EAAW,sBAAuB,oBAAqB,+BAAgC,GAAGD,EAAQJ,CAAS,GAEtH,gBAACL,EAAoB,SAApB,CAA6B,MAAOD,GAAOX,CAAS,CACvD,CAEJ,CAAC,EACDgB,EAAW,YAAc,mBAQzB,IAAMO,EAAmB,aAA4C,CAAC,CAAE,UAAAN,EAAW,MAAAC,EAAO,SAAAlB,EAAU,GAAGmB,CAAM,EAAGC,IAAiB,CAC/H,IAAMC,EAASjB,EAAiB,EAC1BO,EAAOF,EAAY,EACzB,OACE,gBAAC,OACE,GAAGU,EACJ,IAAKC,EACL,aAAYF,GAAS,OACrB,UAAWI,EAAW,sBAAuB,oBAAqB,+BAAgC,GAAGD,EAAQJ,CAAS,GAEtH,gBAACL,EAAoB,SAApB,CAA6B,MAAOD,GAAOX,CAAS,CACvD,CAEJ,CAAC,EACDuB,EAAW,YAAc,mBAoBzB,IAAMC,EAAe,aAAwC,CAAC,CAAE,UAAAP,EAAW,MAAAQ,EAAO,IAAAC,EAAK,SAAA1B,EAAU,KAAA2B,EAAO,GAAO,KAAAC,EAAO,GAAO,GAAGT,CAAM,EAAGC,IAAiB,CACxJ,IAAMC,EAASjB,EAAiB,EAE1ByB,EAAoB,aAAWhC,CAAmB,EAClDQ,EAASV,EAAiB,EAC1BmC,EAAYD,GAAexB,IAAW,MAAQ,CAACuB,EAG/CG,EAAoB,aAAWjC,CAAkB,EACjDkC,EAAcC,EAAmB,EACvC,GAAIH,EAAW,CACb,IAAMI,EAAWf,EAAM,WAAaY,GAAeC,EAAc,GAAK,QACtE,OACE,gBAACG,EAAA,CAAY,GAAGhB,EAAO,SAAUe,EAAU,IAAKd,EAAc,KAAK,QAAQ,KAAMO,EAAM,UAAU,mBAC/F,gBAAC,OAAI,MAAOF,EAAO,IAAKC,EAAK,UAAWJ,EAAW,yBAA0BL,CAAS,GACnFjB,CACH,CACF,CAEJ,CACA,OACE,gBAACmC,EAAA,CAAY,GAAGhB,EAAO,IAAKC,EAAc,KAAK,QAAQ,KAAMO,EAAM,UAAU,mBAC3E,gBAAC,OAAI,MAAOF,EAAO,IAAKC,EAAK,UAAWJ,EAAW,sBAAuB,qBAAsB,GAAGD,EAAQJ,CAAS,GAElH,gBAACL,EAAoB,SAApB,CAA6B,MAAO,MACnC,gBAAC,OAAI,UAAU,wBAAwBZ,CAAS,CAClD,CACF,CACF,CAEJ,CAAC,EACDwB,EAAO,YAAc",
|
|
6
|
+
"names": ["React", "classNames", "SidebarVisualContext", "useSidebarVisual", "ShellSizeContext", "ShellContentContext", "ShellWindowContext", "PaneChromeScope", "children", "presentation", "size", "value", "useChromeClasses", "visual", "shellSize", "menuVariant", "BAND_STEP", "useBandSize", "usePaneBandSize", "band", "PaneBandSizeContext", "inShell", "ShellStoreContext", "step", "PaneHeader", "className", "float", "props", "forwardedRef", "chrome", "classNames", "PaneFooter", "Scroll", "style", "dir", "fade", "pane", "contentPane", "inContent", "windowShell", "pageScrolls", "usePageScrollMedia", "tabIndex", "ScrollArea"]
|
|
7
7
|
}
|
|
@@ -79,6 +79,12 @@ declare const PaneFooter: React.ForwardRefExoticComponent<PaneFooterProps & Reac
|
|
|
79
79
|
interface ScrollProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
80
80
|
/** Fades the list out toward an edge with more past it, and under a floating header or footer. */
|
|
81
81
|
fade?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Keeps the pane's list (its menu rows) when React puts this under `Shell.Content`, as when an
|
|
84
|
+
* app renders a pane's content in its page and portals it into `Shell.Panel`. In a Rail, Panel
|
|
85
|
+
* or Sidebar it is already the pane's list.
|
|
86
|
+
*/
|
|
87
|
+
pane?: boolean;
|
|
82
88
|
}
|
|
83
89
|
/**
|
|
84
90
|
* The one region of a pane that scrolls; it takes the room the header and footer leave.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pane-chrome.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/pane-chrome.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAuB,KAAK,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAG5E,KAAK,QAAQ,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAEhC,KAAK,yBAAyB,GAAG;IAC/B,IAAI,EAAE,QAAQ,CAAC;IACf,WAAW,EAAE,OAAO,GAAG,MAAM,CAAC;IAC9B,YAAY,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,2FAA2F;AAC3F,QAAA,MAAM,oBAAoB,iDAA8D,CAAC;AAEzF,iBAAS,gBAAgB,qCAExB;AAED,mFAAmF;AACnF,QAAA,MAAM,gBAAgB,yBAAqC,CAAC;AAE5D;;;;GAIG;AACH,QAAA,MAAM,mBAAmB,wBAA6B,CAAC;AAEvD;;;;GAIG;AACH,QAAA,MAAM,kBAAkB,wBAA6B,CAAC;AAEtD;;;GAGG;AACH,iBAAS,eAAe,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,qBAIxG;AAWD;;;GAGG;AACH,QAAA,MAAM,SAAS;;;;;CAA2F,CAAC;AAQ3G;;;;;;;GAOG;AACH,iBAAS,eAAe,IAAI,QAAQ,GAAG,IAAI,CAM1C;AAED,UAAU,eAAgB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;IACrE;;;;;OAKG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,8DAA8D;AAC9D,QAAA,MAAM,UAAU,wFAad,CAAC;AAGH,UAAU,eAAgB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;IACrE,0GAA0G;IAC1G,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,8DAA8D;AAC9D,QAAA,MAAM,UAAU,wFAad,CAAC;AAGH,UAAU,WAAY,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;IACjE,kGAAkG;IAClG,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED;;;;;;GAMG;AACH,QAAA,MAAM,MAAM,oFA8BV,CAAC;AAGH,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,eAAe,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;AAC1L,YAAY,EAAE,yBAAyB,EAAE,QAAQ,EAAE,QAAQ,EAAE,eAAe,EAAE,eAAe,EAAE,WAAW,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"pane-chrome.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/pane-chrome.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAuB,KAAK,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAG5E,KAAK,QAAQ,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAEhC,KAAK,yBAAyB,GAAG;IAC/B,IAAI,EAAE,QAAQ,CAAC;IACf,WAAW,EAAE,OAAO,GAAG,MAAM,CAAC;IAC9B,YAAY,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,2FAA2F;AAC3F,QAAA,MAAM,oBAAoB,iDAA8D,CAAC;AAEzF,iBAAS,gBAAgB,qCAExB;AAED,mFAAmF;AACnF,QAAA,MAAM,gBAAgB,yBAAqC,CAAC;AAE5D;;;;GAIG;AACH,QAAA,MAAM,mBAAmB,wBAA6B,CAAC;AAEvD;;;;GAIG;AACH,QAAA,MAAM,kBAAkB,wBAA6B,CAAC;AAEtD;;;GAGG;AACH,iBAAS,eAAe,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,qBAIxG;AAWD;;;GAGG;AACH,QAAA,MAAM,SAAS;;;;;CAA2F,CAAC;AAQ3G;;;;;;;GAOG;AACH,iBAAS,eAAe,IAAI,QAAQ,GAAG,IAAI,CAM1C;AAED,UAAU,eAAgB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;IACrE;;;;;OAKG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,8DAA8D;AAC9D,QAAA,MAAM,UAAU,wFAad,CAAC;AAGH,UAAU,eAAgB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;IACrE,0GAA0G;IAC1G,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,8DAA8D;AAC9D,QAAA,MAAM,UAAU,wFAad,CAAC;AAGH,UAAU,WAAY,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;IACjE,kGAAkG;IAClG,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED;;;;;;GAMG;AACH,QAAA,MAAM,MAAM,oFA8BV,CAAC;AAGH,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,eAAe,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;AAC1L,YAAY,EAAE,yBAAyB,EAAE,QAAQ,EAAE,QAAQ,EAAE,eAAe,EAAE,eAAe,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use client";import{a,b,c,d,e,f,g,h,i,j,k}from"../../chunk-
|
|
2
|
+
"use client";import{a,b,c,d,e,f,g,h,i,j,k}from"../../chunk-MJROOEPE.js";import"../../chunk-MGWGD6KI.js";import"../../chunk-KOAWATCI.js";import"../../chunk-5KJIPH2N.js";import"../../chunk-YOSLXJI5.js";import"../../chunk-QEDKL23P.js";import"../../chunk-LPLW7OWA.js";import"../../chunk-L54FWKJE.js";import"../../chunk-OKQAVYW4.js";import"../../chunk-XU74PNM2.js";import"../../chunk-CLJ6SEGP.js";import"../../chunk-ANQLWGFN.js";import"../../chunk-GHWEXMF6.js";import"../../chunk-MAA6LEE2.js";import"../../chunk-VQPANPMI.js";export{g as BAND_STEP,f as PaneChromeScope,j as PaneFooter,i as PaneHeader,k as Scroll,d as ShellContentContext,c as ShellSizeContext,e as ShellWindowContext,a as SidebarVisualContext,h as usePaneBandSize,b as useSidebarVisual};
|
|
3
3
|
//# sourceMappingURL=pane-chrome.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use client";import{a}from"../../chunk-
|
|
2
|
+
"use client";import{a}from"../../chunk-AS2STDGA.js";import"../../chunk-MJROOEPE.js";import"../../chunk-MGWGD6KI.js";import"../../chunk-KOAWATCI.js";import"../../chunk-5KJIPH2N.js";import"../../chunk-YOSLXJI5.js";import"../../chunk-QEDKL23P.js";import"../../chunk-LPLW7OWA.js";import"../../chunk-L54FWKJE.js";import"../../chunk-OKQAVYW4.js";import"../../chunk-XU74PNM2.js";import"../../chunk-CLJ6SEGP.js";import"../../chunk-ANQLWGFN.js";import"../../chunk-3QWGSRYC.js";import"../../chunk-LTUW36HM.js";import"../../chunk-QKCNGEX4.js";import"../../chunk-WEBNIUEX.js";import"../../chunk-XUCR7L4G.js";import"../../chunk-G66WDIIV.js";import"../../chunk-GHWEXMF6.js";import"../../chunk-MAA6LEE2.js";import"../../chunk-VQPANPMI.js";export{a as Sidebar};
|
|
3
3
|
//# sourceMappingURL=shell-sidebar.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import"../chunk-NG54K6FL.js";import{a as ma}from"../chunk-7QBNXNEN.js";import{e as $}from"../chunk-REORAMUH.js";import{a as aa}from"../chunk-K3GDM26A.js";import{c as ba}from"../chunk-ZOUIIO4C.js";import{a as ca}from"../chunk-FMVOB367.js";import{a as da,c as ea,d as fa,e as ga,f as ha,g as ia,h as ja,i as ka,j as la}from"../chunk-
|
|
2
|
+
import"../chunk-NG54K6FL.js";import{a as ma}from"../chunk-7QBNXNEN.js";import{e as $}from"../chunk-REORAMUH.js";import{a as aa}from"../chunk-K3GDM26A.js";import{c as ba}from"../chunk-ZOUIIO4C.js";import{a as ca}from"../chunk-FMVOB367.js";import{a as da,c as ea,d as fa,e as ga,f as ha,g as ia,h as ja,i as ka,j as la}from"../chunk-JTMLFTNZ.js";import{h as oa}from"../chunk-4LV37PHM.js";import{l as na}from"../chunk-2FYUM6TA.js";import{a as Y}from"../chunk-B6OFKABP.js";import{a as Z}from"../chunk-JKQN6QCP.js";import{h as _}from"../chunk-X7JHZ3HA.js";import{c as V}from"../chunk-W4Z6ORYO.js";import{h as W}from"../chunk-VQDCHBZR.js";import{a as X}from"../chunk-324VC67W.js";import{g as pa}from"../chunk-HR2VHGJ5.js";import"../chunk-4G3FJUER.js";import"../chunk-ZG2XQUOH.js";import{a as R}from"../chunk-D2C2A2ZK.js";import{c as S}from"../chunk-HBO7W7SS.js";import{a as T}from"../chunk-H2J25HXP.js";import{a as U}from"../chunk-L66IUPDW.js";import{a as O}from"../chunk-C67MM24U.js";import{i as qa}from"../chunk-MMDZBPSX.js";import{e as P}from"../chunk-NWXODCTD.js";import{a as Q}from"../chunk-AXODGYRY.js";import{n as J}from"../chunk-2S7HPQVX.js";import{g as K}from"../chunk-5BX2YZV6.js";import{o as L}from"../chunk-67UEMB4K.js";import"../chunk-2ACVWLFA.js";import{a as M}from"../chunk-Q5SANVIW.js";import{a as N}from"../chunk-ENQV6SEA.js";import{a as y}from"../chunk-EPGIYTFK.js";import{m as C}from"../chunk-LABMK6Q7.js";import{b as z,c as A}from"../chunk-7V6M3MIR.js";import{c as D}from"../chunk-FYTLUDL3.js";import"../chunk-2VSRZ4IT.js";import{a as E}from"../chunk-JD4KR6VZ.js";import"../chunk-4KIZRO52.js";import{a as F}from"../chunk-J54GYD7A.js";import{a as G}from"../chunk-WD66RYF6.js";import{l as I}from"../chunk-2E57H3NH.js";import{g as H}from"../chunk-MJKVVGGV.js";import{a as B}from"../chunk-WUCBFB25.js";import{a as n}from"../chunk-B6YGNB3V.js";import{f as o}from"../chunk-DP7MPGR7.js";import{h as r}from"../chunk-WAXRIARV.js";import"../chunk-FATCGZZE.js";import"../chunk-7VJF6EXN.js";import{a as p}from"../chunk-JP36JSNP.js";import"../chunk-TGRHRMQI.js";import{a as s}from"../chunk-SUQJ7DD4.js";import{a as t}from"../chunk-HLIOHDEX.js";import{a as u}from"../chunk-XD3C3GVF.js";import{a as x}from"../chunk-KJZSXLIX.js";import"../chunk-Y2DBXOLT.js";import{a as v,b as w}from"../chunk-6YWHNLSC.js";import{a as q}from"../chunk-4MNRLB57.js";import"../chunk-BQC2P3SN.js";import"../chunk-UJ7JERJ5.js";import"../chunk-YMUERC2J.js";import"../chunk-AS2STDGA.js";import"../chunk-2ZKEQS76.js";import{a as d}from"../chunk-BUXK5VGR.js";import{a as c}from"../chunk-KVVRFWGQ.js";import"../chunk-YCLPURTD.js";import"../chunk-CR65RYGM.js";import{a as e,b as f,c as g,d as h}from"../chunk-GKDGNPBD.js";import"../chunk-7N2Q5WOM.js";import"../chunk-OAJ5DARR.js";import{b as a,c as b}from"../chunk-5KMEUZWN.js";import"../chunk-5JYSYTHA.js";import"../chunk-ISCZ57VL.js";import"../chunk-EB4AG3OL.js";import{a as i}from"../chunk-QPRUTOLI.js";import"../chunk-MJROOEPE.js";import{a as j}from"../chunk-MGWGD6KI.js";import"../chunk-KOAWATCI.js";import"../chunk-5KJIPH2N.js";import"../chunk-YOSLXJI5.js";import"../chunk-QEDKL23P.js";import"../chunk-LPLW7OWA.js";import"../chunk-L54FWKJE.js";import"../chunk-OKQAVYW4.js";import"../chunk-AQKSO3SW.js";import{a as k,b as l,c as m}from"../chunk-FVRVBB6O.js";import"../chunk-GHUAUFG7.js";import"../chunk-5ON3XLRD.js";import"../chunk-HBWBPBSA.js";import"../chunk-XU74PNM2.js";import"../chunk-CLJ6SEGP.js";import"../chunk-ANQLWGFN.js";import"../chunk-QRV32INS.js";import"../chunk-3QWGSRYC.js";import"../chunk-LTUW36HM.js";import"../chunk-QKCNGEX4.js";import"../chunk-WEBNIUEX.js";import"../chunk-XUCR7L4G.js";import"../chunk-G66WDIIV.js";import"../chunk-GHWEXMF6.js";import"../chunk-MAA6LEE2.js";import"../chunk-VQPANPMI.js";export{n as AccessibleIcon,o as Accordion,r as AlertDialog,s as Avatar,t as Blockquote,u as Box,x as Button,y as Card,C as Chatbar,E as Checkbox,D as CheckboxGroup,g as ChevronDownIcon,F as Chip,G as Code,I as Combobox,A as Confirmation,J as ContextMenu,K as Dialog,L as DropdownMenu,c as Flex,M as Grid,p as Heading,N as Image,i as Kbd,O as Link,qa as MessageScroller,P as Navbar,z as Notice,H as Popover,Q as Portal,R as Progress,T as Radio,S as RadioGroup,U as Reset,j as ScrollArea,V as SegmentedControl,W as Select,X as Separator,pa as Sheet,oa as Shell,na as Sidebar,Y as Slider,a as Slot,b as Slottable,d as Spinner,Z as Switch,_ as Table,$ as Tabs,q as Text,aa as TextArea,ba as TextField,m as Theme,k as ThemeContext,f as ThickCheckIcon,h as ThickChevronRightIcon,e as ThickDividerHorizontalIcon,ca as Toggle,la as Toolbar,fa as ToolbarButton,ia as ToolbarFill,ea as ToolbarGroup,ga as ToolbarOverflow,ja as ToolbarSeparator,ha as ToolbarSlot,ka as ToolbarTitle,w as Tooltip,v as TooltipProvider,ma as VirtualMenu,B as VisuallyHidden,l as useThemeContext,da as useToolbarOverflow};
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use client";import{a as j,b as k,c as l,d as m,e as n,f as o,g as p}from"../chunk-
|
|
2
|
+
"use client";import{a as j,b as k,c as l,d as m,e as n,f as o,g as p}from"../chunk-4LV37PHM.js";import{a as g,b as h}from"../chunk-4G3FJUER.js";import{a as i}from"../chunk-ZG2XQUOH.js";import{a as e}from"../chunk-YMUERC2J.js";import{a as f}from"../chunk-AS2STDGA.js";import{i as a,j as b,k as c}from"../chunk-MJROOEPE.js";import"../chunk-MGWGD6KI.js";import"../chunk-KOAWATCI.js";import"../chunk-5KJIPH2N.js";import"../chunk-YOSLXJI5.js";import"../chunk-QEDKL23P.js";import"../chunk-LPLW7OWA.js";import"../chunk-L54FWKJE.js";import"../chunk-OKQAVYW4.js";import"../chunk-5ON3XLRD.js";import"../chunk-XU74PNM2.js";import"../chunk-CLJ6SEGP.js";import"../chunk-ANQLWGFN.js";import{a as d}from"../chunk-QRV32INS.js";import"../chunk-3QWGSRYC.js";import"../chunk-LTUW36HM.js";import"../chunk-QKCNGEX4.js";import"../chunk-WEBNIUEX.js";import"../chunk-XUCR7L4G.js";import"../chunk-G66WDIIV.js";import"../chunk-GHWEXMF6.js";import"../chunk-MAA6LEE2.js";import"../chunk-VQPANPMI.js";export{d as Bottom,o as Content,k as Header,e as Inspector,l as Left,b as PaneFooter,a as PaneHeader,n as Panel,m as Rail,j as Root,c as Scroll,f as Sidebar,p as Trigger,i as useResponsivePresentation,h as useShell,g as useSidebarMode};
|
|
3
3
|
//# sourceMappingURL=shell.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use client";import{a,b,c,d,e,f,g,h,i,j,k}from"../chunk-
|
|
2
|
+
"use client";import{a,b,c,d,e,f,g,h,i,j,k}from"../chunk-2FYUM6TA.js";import"../chunk-324VC67W.js";import"../chunk-67UEMB4K.js";import"../chunk-2ACVWLFA.js";import"../chunk-J54GYD7A.js";import"../chunk-MJKVVGGV.js";import"../chunk-TGRHRMQI.js";import"../chunk-6YWHNLSC.js";import"../chunk-4MNRLB57.js";import"../chunk-BQC2P3SN.js";import"../chunk-UJ7JERJ5.js";import"../chunk-GKDGNPBD.js";import"../chunk-5KMEUZWN.js";import"../chunk-5JYSYTHA.js";import"../chunk-ISCZ57VL.js";import"../chunk-EB4AG3OL.js";import"../chunk-QPRUTOLI.js";import"../chunk-MJROOEPE.js";import"../chunk-MGWGD6KI.js";import"../chunk-KOAWATCI.js";import"../chunk-5KJIPH2N.js";import"../chunk-YOSLXJI5.js";import"../chunk-QEDKL23P.js";import"../chunk-LPLW7OWA.js";import"../chunk-L54FWKJE.js";import"../chunk-OKQAVYW4.js";import"../chunk-AQKSO3SW.js";import"../chunk-FVRVBB6O.js";import"../chunk-GHUAUFG7.js";import"../chunk-5ON3XLRD.js";import"../chunk-HBWBPBSA.js";import"../chunk-XU74PNM2.js";import"../chunk-CLJ6SEGP.js";import"../chunk-ANQLWGFN.js";import"../chunk-G66WDIIV.js";import"../chunk-GHWEXMF6.js";import"../chunk-MAA6LEE2.js";import"../chunk-VQPANPMI.js";export{h as Group,j as GroupContent,i as GroupLabel,b as Menu,d as MenuButton,c as MenuItem,e as MenuSub,g as MenuSubContent,f as MenuSubTrigger,k as Search,a as Separator};
|
|
3
3
|
//# sourceMappingURL=sidebar.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use client";import{a,b,c,d,e,f,g,h,i,j}from"../chunk-
|
|
2
|
+
"use client";import{a,b,c,d,e,f,g,h,i,j}from"../chunk-JTMLFTNZ.js";import"../chunk-67UEMB4K.js";import"../chunk-2ACVWLFA.js";import"../chunk-TGRHRMQI.js";import"../chunk-KJZSXLIX.js";import"../chunk-Y2DBXOLT.js";import"../chunk-6YWHNLSC.js";import"../chunk-4MNRLB57.js";import"../chunk-BQC2P3SN.js";import"../chunk-UJ7JERJ5.js";import"../chunk-2ZKEQS76.js";import"../chunk-BUXK5VGR.js";import"../chunk-KVVRFWGQ.js";import"../chunk-YCLPURTD.js";import"../chunk-CR65RYGM.js";import"../chunk-GKDGNPBD.js";import"../chunk-7N2Q5WOM.js";import"../chunk-OAJ5DARR.js";import"../chunk-5KMEUZWN.js";import"../chunk-5JYSYTHA.js";import"../chunk-ISCZ57VL.js";import"../chunk-EB4AG3OL.js";import"../chunk-QPRUTOLI.js";import"../chunk-MJROOEPE.js";import"../chunk-MGWGD6KI.js";import"../chunk-KOAWATCI.js";import"../chunk-5KJIPH2N.js";import"../chunk-YOSLXJI5.js";import"../chunk-QEDKL23P.js";import"../chunk-LPLW7OWA.js";import"../chunk-L54FWKJE.js";import"../chunk-OKQAVYW4.js";import"../chunk-AQKSO3SW.js";import"../chunk-FVRVBB6O.js";import"../chunk-GHUAUFG7.js";import"../chunk-5ON3XLRD.js";import"../chunk-HBWBPBSA.js";import"../chunk-XU74PNM2.js";import"../chunk-CLJ6SEGP.js";import"../chunk-ANQLWGFN.js";import"../chunk-G66WDIIV.js";import"../chunk-GHWEXMF6.js";import"../chunk-MAA6LEE2.js";import"../chunk-VQPANPMI.js";export{d as Button,g as Fill,c as Group,e as Overflow,b as Root,h as Separator,f as Slot,i as Title,j as Toolbar,d as ToolbarButton,g as ToolbarFill,c as ToolbarGroup,e as ToolbarOverflow,h as ToolbarSeparator,f as ToolbarSlot,i as ToolbarTitle,a as useToolbarOverflow};
|
|
3
3
|
//# sourceMappingURL=toolbar.js.map
|
package/dist/esm/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import"./chunk-AYKOOEZR.js";import{a as uo}from"./chunk-RIHTVZVJ.js";import{a as vo,b as wo,c as yo,d as zo}from"./chunk-3LIF53YY.js";import{a as so}from"./chunk-WTP2KIK3.js";import"./chunk-NG54K6FL.js";import{a as jo}from"./chunk-7QBNXNEN.js";import{e as ro}from"./chunk-REORAMUH.js";import{a as eo}from"./chunk-K3GDM26A.js";import{c as fo}from"./chunk-ZOUIIO4C.js";import{a as mo}from"./chunk-FMVOB367.js";import{a as po,c as to,d as xo,e as ao,f as bo,g as co,h as go,i as ho,j as io}from"./chunk-
|
|
2
|
+
import"./chunk-AYKOOEZR.js";import{a as uo}from"./chunk-RIHTVZVJ.js";import{a as vo,b as wo,c as yo,d as zo}from"./chunk-3LIF53YY.js";import{a as so}from"./chunk-WTP2KIK3.js";import"./chunk-NG54K6FL.js";import{a as jo}from"./chunk-7QBNXNEN.js";import{e as ro}from"./chunk-REORAMUH.js";import{a as eo}from"./chunk-K3GDM26A.js";import{c as fo}from"./chunk-ZOUIIO4C.js";import{a as mo}from"./chunk-FMVOB367.js";import{a as po,c as to,d as xo,e as ao,f as bo,g as co,h as go,i as ho,j as io}from"./chunk-JTMLFTNZ.js";import{h as lo}from"./chunk-4LV37PHM.js";import{l as ko}from"./chunk-2FYUM6TA.js";import{a as _}from"./chunk-B6OFKABP.js";import{a as $}from"./chunk-JKQN6QCP.js";import{h as oo}from"./chunk-X7JHZ3HA.js";import{c as X}from"./chunk-W4Z6ORYO.js";import{h as Y}from"./chunk-VQDCHBZR.js";import{a as Z}from"./chunk-324VC67W.js";import{g as no}from"./chunk-HR2VHGJ5.js";import"./chunk-4G3FJUER.js";import"./chunk-ZG2XQUOH.js";import{a as T}from"./chunk-D2C2A2ZK.js";import{c as U}from"./chunk-HBO7W7SS.js";import{a as V}from"./chunk-H2J25HXP.js";import{a as W}from"./chunk-L66IUPDW.js";import{a as Q}from"./chunk-C67MM24U.js";import{i as qo}from"./chunk-MMDZBPSX.js";import{e as R}from"./chunk-NWXODCTD.js";import{a as S}from"./chunk-AXODGYRY.js";import{n as L}from"./chunk-2S7HPQVX.js";import{g as M}from"./chunk-5BX2YZV6.js";import{o as N}from"./chunk-67UEMB4K.js";import"./chunk-2ACVWLFA.js";import{a as O}from"./chunk-Q5SANVIW.js";import{a as P}from"./chunk-ENQV6SEA.js";import{a as A}from"./chunk-EPGIYTFK.js";import{m as E}from"./chunk-LABMK6Q7.js";import{b as B,c as C}from"./chunk-7V6M3MIR.js";import{c as F}from"./chunk-FYTLUDL3.js";import"./chunk-2VSRZ4IT.js";import{a as G}from"./chunk-JD4KR6VZ.js";import"./chunk-4KIZRO52.js";import{a as H}from"./chunk-J54GYD7A.js";import{a as I}from"./chunk-WD66RYF6.js";import{l as K}from"./chunk-2E57H3NH.js";import{g as J}from"./chunk-MJKVVGGV.js";import{a as D}from"./chunk-WUCBFB25.js";import{a as h}from"./chunk-B6YGNB3V.js";import{f as i}from"./chunk-DP7MPGR7.js";import{h as n}from"./chunk-WAXRIARV.js";import"./chunk-FATCGZZE.js";import{a as l}from"./chunk-7VJF6EXN.js";import{a as j}from"./chunk-JP36JSNP.js";import"./chunk-TGRHRMQI.js";import{a as q}from"./chunk-SUQJ7DD4.js";import{a as s}from"./chunk-HLIOHDEX.js";import{a as u}from"./chunk-XD3C3GVF.js";import{a as z}from"./chunk-KJZSXLIX.js";import{a as y}from"./chunk-Y2DBXOLT.js";import{a as v,b as w}from"./chunk-6YWHNLSC.js";import{a as k}from"./chunk-4MNRLB57.js";import"./chunk-BQC2P3SN.js";import"./chunk-UJ7JERJ5.js";import"./chunk-YMUERC2J.js";import"./chunk-AS2STDGA.js";import"./chunk-2ZKEQS76.js";import{a as f}from"./chunk-BUXK5VGR.js";import{a as e}from"./chunk-KVVRFWGQ.js";import"./chunk-YCLPURTD.js";import"./chunk-CR65RYGM.js";import{a as m,b as p,c as t,d as x}from"./chunk-GKDGNPBD.js";import"./chunk-7N2Q5WOM.js";import"./chunk-OAJ5DARR.js";import{b as o,c as r}from"./chunk-5KMEUZWN.js";import"./chunk-5JYSYTHA.js";import"./chunk-ISCZ57VL.js";import"./chunk-EB4AG3OL.js";import{a}from"./chunk-QPRUTOLI.js";import"./chunk-MJROOEPE.js";import{a as b}from"./chunk-MGWGD6KI.js";import"./chunk-KOAWATCI.js";import"./chunk-5KJIPH2N.js";import"./chunk-YOSLXJI5.js";import"./chunk-QEDKL23P.js";import"./chunk-LPLW7OWA.js";import"./chunk-L54FWKJE.js";import"./chunk-OKQAVYW4.js";import"./chunk-AQKSO3SW.js";import{a as c,b as d,c as g}from"./chunk-FVRVBB6O.js";import"./chunk-GHUAUFG7.js";import"./chunk-5ON3XLRD.js";import"./chunk-HBWBPBSA.js";import"./chunk-XU74PNM2.js";import"./chunk-CLJ6SEGP.js";import"./chunk-ANQLWGFN.js";import"./chunk-QRV32INS.js";import"./chunk-3QWGSRYC.js";import"./chunk-LTUW36HM.js";import"./chunk-QKCNGEX4.js";import"./chunk-WEBNIUEX.js";import"./chunk-XUCR7L4G.js";import"./chunk-G66WDIIV.js";import"./chunk-GHWEXMF6.js";import"./chunk-MAA6LEE2.js";import"./chunk-VQPANPMI.js";export{vo as APPEARANCE_STORAGE_KEY,h as AccessibleIcon,i as Accordion,n as AlertDialog,q as Avatar,s as Blockquote,u as Box,z as Button,A as Card,E as Chatbar,G as Checkbox,F as CheckboxGroup,t as ChevronDownIcon,H as Chip,I as Code,K as Combobox,C as Confirmation,L as ContextMenu,M as Dialog,N as DropdownMenu,e as Flex,O as Grid,j as Heading,P as Image,a as Kbd,Q as Link,qo as MessageScroller,R as Navbar,B as Notice,J as Popover,S as Portal,T as Progress,V as Radio,U as RadioGroup,W as Reset,b as ScrollArea,X as SegmentedControl,Y as Select,Z as Separator,no as Sheet,lo as Shell,ko as Sidebar,_ as Slider,o as Slot,r as Slottable,f as Spinner,$ as Switch,oo as Table,ro as Tabs,k as Text,eo as TextArea,fo as TextField,g as Theme,c as ThemeContext,p as ThickCheckIcon,x as ThickChevronRightIcon,m as ThickDividerHorizontalIcon,mo as Toggle,io as Toolbar,xo as ToolbarButton,co as ToolbarFill,to as ToolbarGroup,ao as ToolbarOverflow,go as ToolbarSeparator,bo as ToolbarSlot,ho as ToolbarTitle,w as Tooltip,v as TooltipProvider,jo as VirtualMenu,D as VisuallyHidden,wo as appearanceScript,yo as setAppearance,zo as useAppearance,l as useBodyPointerEventsCleanup,so as useLiveAnnouncer,d as useThemeContext,uo as useToggleState,po as useToolbarOverflow,y as useTooltipWrapper};
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -208,7 +208,7 @@
|
|
|
208
208
|
--base-menu-font-size: var(--font-size-1);
|
|
209
209
|
--base-menu-line-height: var(--line-height-1);
|
|
210
210
|
--base-menu-letter-spacing: var(--letter-spacing-1);
|
|
211
|
-
border-radius: var(--radius-
|
|
211
|
+
border-radius: var(--radius-panel-1);
|
|
212
212
|
}
|
|
213
213
|
|
|
214
214
|
&:where(.kui-r-size-2) {
|
|
@@ -223,7 +223,7 @@
|
|
|
223
223
|
--base-menu-font-size: var(--font-size-2);
|
|
224
224
|
--base-menu-line-height: var(--line-height-2);
|
|
225
225
|
--base-menu-letter-spacing: var(--letter-spacing-2);
|
|
226
|
-
border-radius: var(--radius-
|
|
226
|
+
border-radius: var(--radius-panel-2);
|
|
227
227
|
}
|
|
228
228
|
|
|
229
229
|
&:where(.kui-r-size-3) {
|
|
@@ -238,7 +238,7 @@
|
|
|
238
238
|
--base-menu-font-size: var(--font-size-3);
|
|
239
239
|
--base-menu-line-height: var(--line-height-3);
|
|
240
240
|
--base-menu-letter-spacing: var(--letter-spacing-3);
|
|
241
|
-
border-radius: var(--radius-
|
|
241
|
+
border-radius: var(--radius-panel-3);
|
|
242
242
|
}
|
|
243
243
|
|
|
244
244
|
&:where(.kui-r-size-4) {
|
|
@@ -253,7 +253,7 @@
|
|
|
253
253
|
--base-menu-font-size: var(--font-size-4);
|
|
254
254
|
--base-menu-line-height: var(--line-height-4);
|
|
255
255
|
--base-menu-letter-spacing: var(--letter-spacing-4);
|
|
256
|
-
border-radius: var(--radius-
|
|
256
|
+
border-radius: var(--radius-panel-4);
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
259
|
}
|
|
@@ -149,6 +149,12 @@ PaneFooter.displayName = 'Shell.PaneFooter';
|
|
|
149
149
|
interface ScrollProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
150
150
|
/** Fades the list out toward an edge with more past it, and under a floating header or footer. */
|
|
151
151
|
fade?: boolean;
|
|
152
|
+
/**
|
|
153
|
+
* Keeps the pane's list (its menu rows) when React puts this under `Shell.Content`, as when an
|
|
154
|
+
* app renders a pane's content in its page and portals it into `Shell.Panel`. In a Rail, Panel
|
|
155
|
+
* or Sidebar it is already the pane's list.
|
|
156
|
+
*/
|
|
157
|
+
pane?: boolean;
|
|
152
158
|
}
|
|
153
159
|
|
|
154
160
|
/**
|
|
@@ -158,12 +164,12 @@ interface ScrollProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
|
158
164
|
* `className`, `style` and `dir` apply to the content inside it. In a Rail, Panel or Sidebar the pane is
|
|
159
165
|
* already a navigation landmark, so it needs no role of its own.
|
|
160
166
|
*/
|
|
161
|
-
const Scroll = React.forwardRef<HTMLDivElement, ScrollProps>(({ className, style, dir, children, fade = false, ...props }, forwardedRef) => {
|
|
167
|
+
const Scroll = React.forwardRef<HTMLDivElement, ScrollProps>(({ className, style, dir, children, fade = false, pane = false, ...props }, forwardedRef) => {
|
|
162
168
|
const chrome = useChromeClasses();
|
|
163
169
|
// A Sidebar.Root inside the content still gets a menu.
|
|
164
170
|
const contentPane = React.useContext(ShellContentContext);
|
|
165
171
|
const visual = useSidebarVisual();
|
|
166
|
-
const inContent = contentPane && visual === null;
|
|
172
|
+
const inContent = contentPane && visual === null && !pane;
|
|
167
173
|
// While the page scrolls, the content's viewport scrolls nothing: as a tab stop it would take a
|
|
168
174
|
// Tab, ring the whole page and move nothing. Resolved after mount; a `tabIndex` of the caller's wins.
|
|
169
175
|
const windowShell = React.useContext(ShellWindowContext);
|
|
@@ -45,6 +45,9 @@
|
|
|
45
45
|
right: 0;
|
|
46
46
|
margin-inline: auto;
|
|
47
47
|
z-index: 1;
|
|
48
|
+
/* Centred by left/right 0 and auto margins, so it needs a width of its own: an icon-only button
|
|
49
|
+
is square by aspect-ratio, and without one it stretched across the transcript. */
|
|
50
|
+
width: var(--base-button-height);
|
|
48
51
|
}
|
|
49
52
|
|
|
50
53
|
/* Asleep while the reader is at the end: the primitive makes it inert; this makes it unseen. */
|