@kushagradhawan/kookie-ui 0.1.49 → 0.1.51

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.
Files changed (103) hide show
  1. package/components.css +880 -243
  2. package/dist/cjs/components/_internal/shell-bottom.d.ts +31 -5
  3. package/dist/cjs/components/_internal/shell-bottom.d.ts.map +1 -1
  4. package/dist/cjs/components/_internal/shell-bottom.js +1 -1
  5. package/dist/cjs/components/_internal/shell-bottom.js.map +3 -3
  6. package/dist/cjs/components/_internal/shell-handles.d.ts.map +1 -1
  7. package/dist/cjs/components/_internal/shell-handles.js +1 -1
  8. package/dist/cjs/components/_internal/shell-handles.js.map +3 -3
  9. package/dist/cjs/components/_internal/shell-inspector.d.ts +23 -5
  10. package/dist/cjs/components/_internal/shell-inspector.d.ts.map +1 -1
  11. package/dist/cjs/components/_internal/shell-inspector.js +1 -1
  12. package/dist/cjs/components/_internal/shell-inspector.js.map +3 -3
  13. package/dist/cjs/components/_internal/shell-sidebar.d.ts +24 -6
  14. package/dist/cjs/components/_internal/shell-sidebar.d.ts.map +1 -1
  15. package/dist/cjs/components/_internal/shell-sidebar.js +1 -1
  16. package/dist/cjs/components/_internal/shell-sidebar.js.map +3 -3
  17. package/dist/cjs/components/chatbar.d.ts +9 -2
  18. package/dist/cjs/components/chatbar.d.ts.map +1 -1
  19. package/dist/cjs/components/chatbar.js +1 -1
  20. package/dist/cjs/components/chatbar.js.map +3 -3
  21. package/dist/cjs/components/shell.context.d.ts +88 -0
  22. package/dist/cjs/components/shell.context.d.ts.map +1 -1
  23. package/dist/cjs/components/shell.context.js +1 -1
  24. package/dist/cjs/components/shell.context.js.map +3 -3
  25. package/dist/cjs/components/shell.d.ts +51 -13
  26. package/dist/cjs/components/shell.d.ts.map +1 -1
  27. package/dist/cjs/components/shell.hooks.d.ts +7 -1
  28. package/dist/cjs/components/shell.hooks.d.ts.map +1 -1
  29. package/dist/cjs/components/shell.hooks.js +1 -1
  30. package/dist/cjs/components/shell.hooks.js.map +3 -3
  31. package/dist/cjs/components/shell.js +1 -1
  32. package/dist/cjs/components/shell.js.map +3 -3
  33. package/dist/cjs/components/shell.types.d.ts +1 -0
  34. package/dist/cjs/components/shell.types.d.ts.map +1 -1
  35. package/dist/cjs/components/shell.types.js +1 -1
  36. package/dist/cjs/components/shell.types.js.map +2 -2
  37. package/dist/cjs/components/sidebar.d.ts +7 -1
  38. package/dist/cjs/components/sidebar.d.ts.map +1 -1
  39. package/dist/cjs/components/sidebar.js +1 -1
  40. package/dist/cjs/components/sidebar.js.map +3 -3
  41. package/dist/esm/components/_internal/shell-bottom.d.ts +31 -5
  42. package/dist/esm/components/_internal/shell-bottom.d.ts.map +1 -1
  43. package/dist/esm/components/_internal/shell-bottom.js +1 -1
  44. package/dist/esm/components/_internal/shell-bottom.js.map +3 -3
  45. package/dist/esm/components/_internal/shell-handles.d.ts.map +1 -1
  46. package/dist/esm/components/_internal/shell-handles.js +1 -1
  47. package/dist/esm/components/_internal/shell-handles.js.map +3 -3
  48. package/dist/esm/components/_internal/shell-inspector.d.ts +23 -5
  49. package/dist/esm/components/_internal/shell-inspector.d.ts.map +1 -1
  50. package/dist/esm/components/_internal/shell-inspector.js +1 -1
  51. package/dist/esm/components/_internal/shell-inspector.js.map +3 -3
  52. package/dist/esm/components/_internal/shell-sidebar.d.ts +24 -6
  53. package/dist/esm/components/_internal/shell-sidebar.d.ts.map +1 -1
  54. package/dist/esm/components/_internal/shell-sidebar.js +1 -1
  55. package/dist/esm/components/_internal/shell-sidebar.js.map +3 -3
  56. package/dist/esm/components/chatbar.d.ts +9 -2
  57. package/dist/esm/components/chatbar.d.ts.map +1 -1
  58. package/dist/esm/components/chatbar.js +1 -1
  59. package/dist/esm/components/chatbar.js.map +3 -3
  60. package/dist/esm/components/shell.context.d.ts +88 -0
  61. package/dist/esm/components/shell.context.d.ts.map +1 -1
  62. package/dist/esm/components/shell.context.js +1 -1
  63. package/dist/esm/components/shell.context.js.map +3 -3
  64. package/dist/esm/components/shell.d.ts +51 -13
  65. package/dist/esm/components/shell.d.ts.map +1 -1
  66. package/dist/esm/components/shell.hooks.d.ts +7 -1
  67. package/dist/esm/components/shell.hooks.d.ts.map +1 -1
  68. package/dist/esm/components/shell.hooks.js +1 -1
  69. package/dist/esm/components/shell.hooks.js.map +3 -3
  70. package/dist/esm/components/shell.js +1 -1
  71. package/dist/esm/components/shell.js.map +3 -3
  72. package/dist/esm/components/shell.types.d.ts +1 -0
  73. package/dist/esm/components/shell.types.d.ts.map +1 -1
  74. package/dist/esm/components/shell.types.js.map +2 -2
  75. package/dist/esm/components/sidebar.d.ts +7 -1
  76. package/dist/esm/components/sidebar.d.ts.map +1 -1
  77. package/dist/esm/components/sidebar.js +1 -1
  78. package/dist/esm/components/sidebar.js.map +3 -3
  79. package/package.json +14 -3
  80. package/schemas/base-button.json +1 -1
  81. package/schemas/button.json +1 -1
  82. package/schemas/icon-button.json +1 -1
  83. package/schemas/index.json +6 -6
  84. package/schemas/toggle-button.json +1 -1
  85. package/schemas/toggle-icon-button.json +1 -1
  86. package/src/components/_internal/base-menu.css +17 -18
  87. package/src/components/_internal/base-sidebar-menu.css +23 -21
  88. package/src/components/_internal/base-sidebar.css +20 -0
  89. package/src/components/_internal/shell-bottom.tsx +176 -49
  90. package/src/components/_internal/shell-handles.tsx +29 -4
  91. package/src/components/_internal/shell-inspector.tsx +175 -43
  92. package/src/components/_internal/shell-sidebar.tsx +176 -69
  93. package/src/components/chatbar.css +240 -21
  94. package/src/components/chatbar.tsx +246 -290
  95. package/src/components/sheet.css +8 -16
  96. package/src/components/shell.context.tsx +79 -0
  97. package/src/components/shell.css +28 -2
  98. package/src/components/shell.hooks.ts +35 -0
  99. package/src/components/shell.tsx +574 -214
  100. package/src/components/shell.types.ts +2 -0
  101. package/src/components/sidebar.css +233 -33
  102. package/src/components/sidebar.tsx +247 -213
  103. package/styles.css +841 -204
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var X=Object.create;var P=Object.defineProperty;var Y=Object.getOwnPropertyDescriptor;var Z=Object.getOwnPropertyNames;var ee=Object.getPrototypeOf,re=Object.prototype.hasOwnProperty;var te=(r,t)=>{for(var o in t)P(r,o,{get:t[o],enumerable:!0})},F=(r,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Z(t))!re.call(r,n)&&n!==o&&P(r,n,{get:()=>t[n],enumerable:!(a=Y(t,n))||a.enumerable});return r};var T=(r,t,o)=>(o=r!=null?X(ee(r)):{},F(t||!r||!r.__esModule?P(o,"default",{value:r,enumerable:!0}):o,r)),oe=r=>F(P({},"__esModule",{value:!0}),r);var ae={};te(ae,{Content:()=>R,Footer:()=>E,Group:()=>A,GroupContent:()=>$,GroupLabel:()=>k,Header:()=>x,Menu:()=>w,MenuButton:()=>I,MenuItem:()=>G,MenuSub:()=>V,MenuSubContent:()=>W,MenuSubTrigger:()=>D,Root:()=>L,Separator:()=>z});module.exports=oe(ae);var e=T(require("react")),i=T(require("classnames")),B=require("./slot.js"),C=T(require("@radix-ui/react-accordion")),f=require("./sidebar.props.js"),K=require("./theme.js"),O=require("./scroll-area.js"),_=require("./separator.js"),q=require("./icons.js"),U=require("../helpers/extract-props.js"),J=require("./kbd.js"),H=require("./badge.js");const j=e.createContext(null);function M(){return e.useContext(j)}const L=e.forwardRef((r,t)=>{const o=(0,K.useThemeContext)(),{size:a=f.sidebarPropDefs.size.default,variant:n=f.sidebarPropDefs.variant.default,menuVariant:d=f.sidebarPropDefs.menuVariant.default,layout:u=f.sidebarPropDefs.layout.default,panelBackground:m,color:l,highContrast:p=f.sidebarPropDefs.highContrast.default}=r,{className:h,children:y,...v}=(0,U.extractProps)(r,f.sidebarPropDefs),{asChild:Q,panelBackground:g,...N}=v,b=l||o.accentColor,c=u||"panel",s=typeof a=="object"?a.initial||"2":a;return e.createElement("div",{...N,ref:t,"data-accent-color":b,className:(0,i.default)("rt-SidebarRoot",h)},e.createElement(j.Provider,{value:{size:s,menuVariant:d}},e.createElement("div",{className:(0,i.default)("rt-SidebarContainer",`rt-variant-${n}`,`rt-r-size-${s}`,`rt-menu-variant-${d}`,c&&`rt-layout-${c}`),"data-accent-color":b,"data-high-contrast":p||void 0,"data-panel-background":m,"data-layout":c},y)))});L.displayName="Sidebar.Root";const R=e.forwardRef(({className:r,children:t,role:o="navigation","aria-label":a="Main navigation",id:n,...d},u)=>{const m=M(),l=m?.size??"2",p=m?.menuVariant??"soft";return e.createElement(O.ScrollArea,{type:"hover"},e.createElement("div",{...d,ref:u,id:n,role:o,"aria-label":a,className:(0,i.default)("rt-BaseMenuContent","rt-SidebarContent",`rt-r-size-${l}`,`rt-menu-variant-${p}`,r)},e.createElement("div",{className:"rt-BaseMenuViewport"},t)))});R.displayName="Sidebar.Content";const x=e.forwardRef(({className:r,asContainer:t=!0,...o},a)=>{const n=M(),d=n?.size??"2",u=n?.menuVariant??"soft";return e.createElement("div",{...o,ref:a,className:(0,i.default)("rt-SidebarHeader",`rt-r-size-${d}`,`rt-menu-variant-${u}`,{"rt-SidebarHeader--container":t},r)})});x.displayName="Sidebar.Header";const E=e.forwardRef(({className:r,asContainer:t=!0,...o},a)=>{const n=M(),d=n?.size??"2",u=n?.menuVariant??"soft";return e.createElement("div",{...o,ref:a,className:(0,i.default)("rt-SidebarFooter",`rt-r-size-${d}`,`rt-menu-variant-${u}`,{"rt-SidebarFooter--container":t},r)})});E.displayName="Sidebar.Footer";const z=e.forwardRef(({className:r,...t},o)=>e.createElement(_.Separator,{...t,ref:o,className:(0,i.default)("rt-SidebarSeparator",r)}));z.displayName="Sidebar.Separator";const w=e.forwardRef(({className:r,...t},o)=>e.createElement("ul",{...t,ref:o,role:"menu",className:(0,i.default)("rt-SidebarMenu",r)}));w.displayName="Sidebar.Menu";const G=e.forwardRef(({className:r,...t},o)=>e.createElement("li",{...t,ref:o,className:(0,i.default)("rt-SidebarMenuItem",r)}));G.displayName="Sidebar.MenuItem";const I=e.forwardRef(({asChild:r=!1,isActive:t=!1,shortcut:o,badge:a,className:n,children:d,onMouseEnter:u,onMouseLeave:m,onKeyDown:l,...p},h)=>{const[y,v]=e.useState(!1),g=M()?.size??"2",N=r?B.Slot:"button",{onClick:b}=p,c=e.useCallback(s=>{switch(s.key){case"Enter":case" ":s.preventDefault(),b&&b(s);break;case"ArrowDown":{s.preventDefault();const S=s.currentTarget.nextElementSibling?.querySelector('[role="menuitem"]');S&&S.focus();break}case"ArrowUp":{s.preventDefault();const S=s.currentTarget.previousElementSibling?.querySelector('[role="menuitem"]');S&&S.focus();break}}l?.(s)},[b,l]);return e.createElement(N,{...p,ref:h,role:"menuitem","aria-current":t?"page":void 0,className:(0,i.default)("rt-reset","rt-BaseMenuItem","rt-SidebarMenuButton",n),"data-active":t||void 0,"data-highlighted":y||void 0,onKeyDown:c,onMouseEnter:s=>{v(!0),u?.(s)},onMouseLeave:s=>{v(!1),m?.(s)}},r?d:e.createElement(e.Fragment,null,d,a&&e.createElement("div",{className:"rt-SidebarMenuBadge"},typeof a=="string"?e.createElement(H.Badge,{size:g,variant:"soft"},a):e.createElement(H.Badge,{size:a.size||g,variant:a.variant||"soft",color:a.color,highContrast:a.highContrast,radius:a.radius},a.content)),o&&e.createElement("div",{className:"rt-BaseMenuShortcut rt-SidebarMenuShortcut"},e.createElement(J.Kbd,{size:g},o))))});I.displayName="Sidebar.MenuButton";const V=e.forwardRef(({defaultOpen:r=!1,children:t,...o},a)=>e.createElement("div",{...o,ref:a},e.createElement(C.Root,{type:"single",collapsible:!0,defaultValue:r?"item":void 0},e.createElement(C.Item,{value:"item"},t))));V.displayName="Sidebar.MenuSub";const D=e.forwardRef(({asChild:r=!1,className:t,children:o,onMouseEnter:a,onMouseLeave:n,...d},u)=>{const[m,l]=e.useState(!1);return e.createElement(C.Header,{asChild:!0},e.createElement("div",null,e.createElement(C.Trigger,{...d,ref:u,asChild:r,role:"menuitem","aria-haspopup":"true",className:(0,i.default)("rt-reset","rt-BaseMenuItem","rt-SidebarMenuButton","rt-SidebarMenuSubTrigger",t),"data-highlighted":m||void 0,onMouseEnter:p=>{l(!0),a?.(p)},onMouseLeave:p=>{l(!1),n?.(p)}},r?o:e.createElement(e.Fragment,null,o,e.createElement(q.ThickChevronRightIcon,{className:(0,i.default)("rt-BaseMenuSubTriggerIcon","rt-SidebarMenuSubTriggerIcon")})))))});D.displayName="Sidebar.MenuSubTrigger";const W=e.forwardRef(({className:r,children:t,...o},a)=>e.createElement(C.Content,{...o,ref:a,className:(0,i.default)("rt-SidebarMenuSubContent",r)},e.createElement("div",{className:"rt-SidebarMenuSubList"},t)));W.displayName="Sidebar.MenuSubContent";const A=e.forwardRef(({className:r,...t},o)=>e.createElement("div",{...t,ref:o,className:(0,i.default)("rt-BaseMenuGroup","rt-SidebarGroup",r)}));A.displayName="Sidebar.Group";const k=e.forwardRef(({asChild:r=!1,className:t,...o},a)=>e.createElement(r?B.Slot:"div",{...o,ref:a,role:"group",className:(0,i.default)("rt-BaseMenuLabel","rt-SidebarGroupLabel",t)}));k.displayName="Sidebar.GroupLabel";const $=e.forwardRef(({className:r,...t},o)=>e.createElement("div",{...t,ref:o,className:(0,i.default)("rt-SidebarGroupContent",r)}));$.displayName="Sidebar.GroupContent";
1
+ "use strict";"use client";var ne=Object.create;var x=Object.defineProperty;var ae=Object.getOwnPropertyDescriptor;var ie=Object.getOwnPropertyNames;var se=Object.getPrototypeOf,de=Object.prototype.hasOwnProperty;var ue=(r,t)=>{for(var o in t)x(r,o,{get:t[o],enumerable:!0})},Q=(r,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ie(t))!de.call(r,i)&&i!==o&&x(r,i,{get:()=>t[i],enumerable:!(n=ae(t,i))||n.enumerable});return r};var E=(r,t,o)=>(o=r!=null?ne(se(r)):{},Q(t||!r||!r.__esModule?x(o,"default",{value:r,enumerable:!0}):o,r)),pe=r=>Q(x({},"__esModule",{value:!0}),r);var le={};ue(le,{Content:()=>I,Footer:()=>V,Group:()=>j,GroupContent:()=>q,GroupLabel:()=>O,Header:()=>G,Menu:()=>W,MenuButton:()=>F,MenuItem:()=>k,MenuSub:()=>$,MenuSubContent:()=>K,MenuSubTrigger:()=>_,Root:()=>D,Separator:()=>A});module.exports=pe(le);var e=E(require("react")),u=E(require("classnames")),z=require("./slot.js"),P=E(require("@radix-ui/react-accordion")),C=E(require("./dropdown-menu.js")),y=require("./sidebar.props.js"),Y=require("./theme.js"),Z=require("./scroll-area.js"),ee=require("./separator.js"),re=require("./icons.js"),te=require("../helpers/extract-props.js"),R=require("./kbd.js"),N=require("./badge.js");const X=e.createContext(null);function v(){return e.useContext(X)}const D=e.forwardRef((r,t)=>{const o=(0,Y.useThemeContext)(),{size:n=y.sidebarPropDefs.size.default,variant:i=y.sidebarPropDefs.variant.default,menuVariant:m=y.sidebarPropDefs.menuVariant.default,layout:p=y.sidebarPropDefs.layout.default,presentation:c,panelBackground:a,color:f,highContrast:d=y.sidebarPropDefs.highContrast.default}=r,{className:g,children:B,...U}=(0,te.extractProps)(r,y.sidebarPropDefs),{asChild:b,panelBackground:J,presentation:T,...H}=U,M=f||o.accentColor,S=c==="thin"?"rail":c==="expanded"?"panel":p||"panel",w=typeof n=="object"?n.initial||"2":n;return e.createElement("div",{...H,ref:t,"data-accent-color":M,className:(0,u.default)("rt-SidebarRoot",g)},e.createElement(X.Provider,{value:{size:w,menuVariant:m,presentation:c,color:M}},e.createElement("div",{className:(0,u.default)("rt-SidebarContainer",`rt-variant-${i}`,`rt-r-size-${w}`,`rt-menu-variant-${m}`,S&&`rt-layout-${S}`),"data-accent-color":M,"data-high-contrast":d||void 0,"data-panel-background":a,"data-presentation":c,"data-layout":S},B)))});D.displayName="Sidebar.Root";const I=e.forwardRef(({className:r,children:t,role:o="navigation","aria-label":n="Main navigation",id:i,...m},p)=>{const c=v(),a=c?.size??"2",f=c?.menuVariant??"soft";return e.createElement(Z.ScrollArea,{type:"hover"},e.createElement("div",{...m,ref:p,id:i,role:o,"aria-label":n,className:(0,u.default)("rt-BaseMenuContent","rt-SidebarContent",`rt-r-size-${a}`,`rt-menu-variant-${f}`,r)},e.createElement("div",{className:"rt-BaseMenuViewport"},t)))});I.displayName="Sidebar.Content";const G=e.forwardRef(({className:r,asContainer:t=!0,...o},n)=>{const i=v(),m=i?.size??"2",p=i?.menuVariant??"soft";return e.createElement("div",{...o,ref:n,className:(0,u.default)("rt-SidebarHeader",`rt-r-size-${m}`,`rt-menu-variant-${p}`,{"rt-SidebarHeader--container":t},r)})});G.displayName="Sidebar.Header";const V=e.forwardRef(({className:r,asContainer:t=!0,...o},n)=>{const i=v(),m=i?.size??"2",p=i?.menuVariant??"soft";return e.createElement("div",{...o,ref:n,className:(0,u.default)("rt-SidebarFooter",`rt-r-size-${m}`,`rt-menu-variant-${p}`,{"rt-SidebarFooter--container":t},r)})});V.displayName="Sidebar.Footer";const A=e.forwardRef(({className:r,...t},o)=>e.createElement(ee.Separator,{...t,ref:o,className:(0,u.default)("rt-SidebarSeparator",r)}));A.displayName="Sidebar.Separator";const W=e.forwardRef(({className:r,...t},o)=>e.createElement("ul",{...t,ref:o,role:"menu",className:(0,u.default)("rt-SidebarMenu",r)}));W.displayName="Sidebar.Menu";const k=e.forwardRef(({className:r,...t},o)=>e.createElement("li",{...t,ref:o,className:(0,u.default)("rt-SidebarMenuItem",r)}));k.displayName="Sidebar.MenuItem";const F=e.forwardRef(({asChild:r=!1,isActive:t=!1,shortcut:o,badge:n,className:i,children:m,onMouseEnter:p,onMouseLeave:c,onKeyDown:a,...f},d)=>{const[g,B]=e.useState(!1),b=v()?.size??"2",J=r?z.Slot:"button",{onClick:T}=f,H=e.useCallback(s=>{switch(s.key){case"Enter":case" ":s.preventDefault(),T&&T(s);break;case"ArrowDown":{s.preventDefault();const l=s.currentTarget.nextElementSibling?.querySelector('[role="menuitem"]');l&&l.focus();break}case"ArrowUp":{s.preventDefault();const l=s.currentTarget.previousElementSibling?.querySelector('[role="menuitem"]');l&&l.focus();break}}a?.(s)},[T,a]),M=s=>{if(typeof s=="string"||typeof s=="number")return e.createElement("span",{className:"rt-SidebarMenuLabel"},s);if(Array.isArray(s))return s.map((l,h)=>e.createElement(e.Fragment,{key:h},M(l)));if(e.isValidElement(s)){const l=s,h=l.props&&l.props.className||"";if(typeof l.type=="string"&&h.split(" ").includes("rt-SidebarMenuLabel"))return l;const oe=M(l.props?.children);return e.cloneElement(l,{...l.props},oe)}return s},S=M(m),w=e.useMemo(()=>{if(!r)return null;try{const s=e.Children.only(S),l=s.props?.children,h=e.createElement(e.Fragment,null,l,n&&e.createElement("div",{className:"rt-SidebarMenuBadge"},typeof n=="string"?e.createElement(N.Badge,{size:b,variant:"soft"},n):e.createElement(N.Badge,{size:n.size||b,variant:n.variant||"soft",color:n.color,highContrast:n.highContrast,radius:n.radius},n.content)),o&&e.createElement("div",{className:"rt-BaseMenuShortcut rt-SidebarMenuShortcut"},e.createElement(R.Kbd,{size:b},o)));return e.cloneElement(s,{...s.props},h)}catch{return S}},[r,S,n,o,b]);return e.createElement(J,{...f,ref:d,role:"menuitem","aria-current":t?"page":void 0,className:(0,u.default)("rt-reset","rt-BaseMenuItem","rt-SidebarMenuButton",i),"data-active":t||void 0,"data-highlighted":g||void 0,onKeyDown:H,onMouseEnter:s=>{B(!0),p?.(s)},onMouseLeave:s=>{B(!1),c?.(s)}},r?w:e.createElement(e.Fragment,null,S,n&&e.createElement("div",{className:"rt-SidebarMenuBadge"},typeof n=="string"?e.createElement(N.Badge,{size:b,variant:"soft"},n):e.createElement(N.Badge,{size:n.size||b,variant:n.variant||"soft",color:n.color,highContrast:n.highContrast,radius:n.radius},n.content)),o&&e.createElement("div",{className:"rt-BaseMenuShortcut rt-SidebarMenuShortcut"},e.createElement(R.Kbd,{size:b},o))))});F.displayName="Sidebar.MenuButton";const L=e.createContext("accordion"),$=e.forwardRef(({defaultOpen:r=!1,children:t,...o},n)=>(v()?.presentation==="thin"?"dropdown":"accordion")==="dropdown"?e.createElement("div",{...o,ref:n},e.createElement(C.Root,null,e.createElement(L.Provider,{value:"dropdown"},t))):e.createElement("div",{...o,ref:n},e.createElement(L.Provider,{value:"accordion"},e.createElement(P.Root,{type:"single",collapsible:!0,defaultValue:r?"item":void 0},e.createElement(P.Item,{value:"item"},t)))));$.displayName="Sidebar.MenuSub";const _=e.forwardRef(({asChild:r=!1,className:t,children:o,onMouseEnter:n,onMouseLeave:i,...m},p)=>{const[c,a]=e.useState(!1);return e.useContext(L)==="dropdown"?e.createElement(C.Trigger,null,e.createElement("button",{...m,ref:p,type:"button",role:"menuitem","aria-haspopup":"menu",className:(0,u.default)("rt-reset","rt-BaseMenuItem","rt-SidebarMenuButton","rt-SidebarMenuSubTrigger",t),"data-highlighted":c||void 0,onMouseEnter:d=>{a(!0),n?.(d)},onMouseLeave:d=>{a(!1),i?.(d)}},o)):e.createElement(P.Header,{asChild:!0},e.createElement("div",null,e.createElement(P.Trigger,{...m,ref:p,asChild:r,role:"menuitem","aria-haspopup":"true",className:(0,u.default)("rt-reset","rt-BaseMenuItem","rt-SidebarMenuButton","rt-SidebarMenuSubTrigger",t),"data-highlighted":c||void 0,onMouseEnter:d=>{a(!0),n?.(d)},onMouseLeave:d=>{a(!1),i?.(d)}},r?o:e.createElement(e.Fragment,null,o,e.createElement(re.ThickChevronRightIcon,{className:(0,u.default)("rt-BaseMenuSubTriggerIcon","rt-SidebarMenuSubTriggerIcon")})))))});_.displayName="Sidebar.MenuSubTrigger";const K=e.forwardRef(({className:r,children:t,...o},n)=>{const i=v();if(e.useContext(L)==="dropdown"){const p=a=>{if(Array.isArray(a))return a.map((f,d)=>e.createElement(e.Fragment,{key:d},p(f)));if(e.isValidElement(a)){if(a.type?.displayName==="Sidebar.MenuButton")return a.props?.children;const d=a.props?.children;if(d!==void 0)return e.cloneElement(a,{...a.props,children:p(d)})}return a},c=e.Children.map(t,(a,f)=>{if(e.isValidElement(a)&&a.type?.displayName==="Sidebar.MenuItem"){const d=a.props?.children,g=p(d);return e.createElement(C.Item,{key:f,asChild:!0},g)}return e.createElement(C.Item,{key:f,asChild:!0},p(a))});return e.createElement(C.Content,{size:i?.size,variant:i?.menuVariant,className:(0,u.default)(r)},e.createElement(C.Group,null,c))}return e.createElement(P.Content,{...o,ref:n,className:(0,u.default)("rt-SidebarMenuSubContent",r)},e.createElement("div",{className:"rt-SidebarMenuSubList"},t))});K.displayName="Sidebar.MenuSubContent";const j=e.forwardRef(({className:r,...t},o)=>e.createElement("div",{...t,ref:o,className:(0,u.default)("rt-BaseMenuGroup","rt-SidebarGroup",r)}));j.displayName="Sidebar.Group";const O=e.forwardRef(({asChild:r=!1,className:t,...o},n)=>e.createElement(r?z.Slot:"div",{...o,ref:n,role:"group",className:(0,u.default)("rt-BaseMenuLabel","rt-SidebarGroupLabel",t)}));O.displayName="Sidebar.GroupLabel";const q=e.forwardRef(({className:r,...t},o)=>e.createElement("div",{...t,ref:o,className:(0,u.default)("rt-SidebarGroupContent",r)}));q.displayName="Sidebar.GroupContent";
2
2
  //# sourceMappingURL=sidebar.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/sidebar.tsx"],
4
- "sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Slot } from './slot.js';\nimport * as Accordion from '@radix-ui/react-accordion';\n\nimport { sidebarPropDefs } from './sidebar.props.js';\nimport { useThemeContext } from './theme.js';\n// import { IconButton } from './icon-button.js';\nimport { ScrollArea } from './scroll-area.js';\nimport { Separator } from './separator.js';\nimport { ThickChevronRightIcon } from './icons.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { Kbd } from './kbd.js';\nimport { Badge } from './badge.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\nimport type { BadgeProps } from './badge.js';\n\n// Badge configuration type for sidebar menu buttons\ntype BadgeConfig = {\n content: React.ReactNode;\n variant?: BadgeProps['variant'];\n size?: BadgeProps['size'];\n color?: BadgeProps['color'];\n highContrast?: BadgeProps['highContrast'];\n radius?: BadgeProps['radius'];\n};\n\n// Internal presentational context (not exported) for size/menu variant\ntype SidebarVisualContextValue = {\n size: '1' | '2';\n menuVariant: 'solid' | 'soft';\n};\nconst SidebarVisualContext = React.createContext<SidebarVisualContextValue | null>(null);\nfunction useSidebarVisual() {\n return React.useContext(SidebarVisualContext);\n}\n\n// Sidebar is now independent of Shell - no integration needed\n\n// Main Sidebar component\ntype SidebarOwnProps = GetPropDefTypes<typeof sidebarPropDefs>;\ninterface SidebarProps extends ComponentPropsWithout<'div', RemovedProps>, SidebarOwnProps {}\n\nconst Sidebar = React.forwardRef<HTMLDivElement, SidebarProps>((props, forwardedRef) => {\n const themeContext = useThemeContext();\n\n const {\n size = sidebarPropDefs.size.default,\n variant = sidebarPropDefs.variant.default,\n menuVariant = sidebarPropDefs.menuVariant.default,\n layout = sidebarPropDefs.layout.default,\n // type = sidebarPropDefs.type.default,\n // side = sidebarPropDefs.side.default,\n // collapsible = sidebarPropDefs.collapsible.default,\n panelBackground,\n color,\n highContrast = sidebarPropDefs.highContrast.default,\n } = props;\n\n const { className, children, ...rootProps } = extractProps(props, sidebarPropDefs);\n const { asChild: _, panelBackground: __, ...safeRootProps } = rootProps; // Remove asChild and panelBackground from DOM props\n const resolvedColor = color || themeContext.accentColor;\n\n // Resolve layout (default to 'panel')\n const resolvedLayout = layout || 'panel';\n\n // Update context with current props - we'll pass the resolved values\n const resolvedSize = typeof size === 'object' ? size.initial || '2' : size;\n return (\n <div\n {...safeRootProps}\n ref={forwardedRef}\n data-accent-color={resolvedColor}\n className={classNames('rt-SidebarRoot', className)}\n >\n <SidebarVisualContext.Provider value={{ size: resolvedSize, menuVariant }}>\n <div\n className={classNames(\n 'rt-SidebarContainer',\n `rt-variant-${variant}`,\n `rt-r-size-${resolvedSize}`,\n `rt-menu-variant-${menuVariant}`,\n resolvedLayout && `rt-layout-${resolvedLayout}`,\n )}\n data-accent-color={resolvedColor}\n data-high-contrast={highContrast || undefined}\n data-panel-background={panelBackground}\n data-layout={resolvedLayout}\n >\n {children}\n </div>\n </SidebarVisualContext.Provider>\n </div>\n );\n});\nSidebar.displayName = 'Sidebar.Root';\n\n// Sidebar content area\ninterface SidebarContentProps extends React.ComponentPropsWithoutRef<'div'> {\n id?: string;\n role?: 'navigation' | 'none';\n 'aria-label'?: string;\n}\n\nconst SidebarContent = React.forwardRef<HTMLDivElement, SidebarContentProps>(\n (\n {\n className,\n children,\n role = 'navigation',\n 'aria-label': ariaLabel = 'Main navigation',\n id,\n ...props\n },\n forwardedRef,\n ) => {\n const visual = useSidebarVisual();\n const size = visual?.size ?? '2';\n const menuVariant = visual?.menuVariant ?? 'soft';\n\n return (\n <ScrollArea type=\"hover\">\n <div\n {...props}\n ref={forwardedRef}\n id={id}\n role={role}\n aria-label={ariaLabel}\n className={classNames(\n 'rt-BaseMenuContent',\n 'rt-SidebarContent',\n `rt-r-size-${size}`,\n `rt-menu-variant-${menuVariant}`,\n className,\n )}\n >\n <div className=\"rt-BaseMenuViewport\">{children}</div>\n </div>\n </ScrollArea>\n );\n },\n);\nSidebarContent.displayName = 'Sidebar.Content';\n\n// Sidebar header\ninterface SidebarHeaderProps extends React.ComponentPropsWithoutRef<'div'> {\n /**\n * Whether to use the default flex container layout.\n * @default true\n */\n asContainer?: boolean;\n}\n\nconst SidebarHeader = React.forwardRef<HTMLDivElement, SidebarHeaderProps>(\n ({ className, asContainer = true, ...props }, forwardedRef) => {\n const visual = useSidebarVisual();\n const size = visual?.size ?? '2';\n const menuVariant = visual?.menuVariant ?? 'soft';\n\n return (\n <div\n {...props}\n ref={forwardedRef}\n className={classNames(\n 'rt-SidebarHeader',\n `rt-r-size-${size}`,\n `rt-menu-variant-${menuVariant}`,\n {\n 'rt-SidebarHeader--container': asContainer,\n },\n className,\n )}\n />\n );\n },\n);\nSidebarHeader.displayName = 'Sidebar.Header';\n\n// Sidebar footer\ninterface SidebarFooterProps extends React.ComponentPropsWithoutRef<'div'> {\n /**\n * Whether to use the default flex container layout.\n * @default true\n */\n asContainer?: boolean;\n}\n\nconst SidebarFooter = React.forwardRef<HTMLDivElement, SidebarFooterProps>(\n ({ className, asContainer = true, ...props }, forwardedRef) => {\n const visual = useSidebarVisual();\n const size = visual?.size ?? '2';\n const menuVariant = visual?.menuVariant ?? 'soft';\n\n return (\n <div\n {...props}\n ref={forwardedRef}\n className={classNames(\n 'rt-SidebarFooter',\n `rt-r-size-${size}`,\n `rt-menu-variant-${menuVariant}`,\n {\n 'rt-SidebarFooter--container': asContainer,\n },\n className,\n )}\n />\n );\n },\n);\nSidebarFooter.displayName = 'Sidebar.Footer';\n\n// Sidebar trigger button\n// removed Trigger in presentational-only Sidebar\n\n// Removed SidebarInset - not needed\n\n// Sidebar separator\ninterface SidebarSeparatorProps extends ComponentPropsWithout<typeof Separator, RemovedProps> {}\n\nconst SidebarSeparator = React.forwardRef<\n React.ComponentRef<typeof Separator>,\n SidebarSeparatorProps\n>(({ className, ...props }, forwardedRef) => (\n <Separator\n {...props}\n ref={forwardedRef}\n className={classNames('rt-SidebarSeparator', className)}\n />\n));\nSidebarSeparator.displayName = 'Sidebar.Separator';\n\n// Menu components - reusing dropdown menu structure\ninterface SidebarMenuProps extends React.ComponentPropsWithoutRef<'ul'> {}\n\nconst SidebarMenu = React.forwardRef<HTMLUListElement, SidebarMenuProps>(\n ({ className, ...props }, forwardedRef) => (\n <ul\n {...props}\n ref={forwardedRef}\n role=\"menu\"\n className={classNames('rt-SidebarMenu', className)}\n />\n ),\n);\nSidebarMenu.displayName = 'Sidebar.Menu';\n\ninterface SidebarMenuItemProps extends React.ComponentPropsWithoutRef<'li'> {}\n\nconst SidebarMenuItem = React.forwardRef<HTMLLIElement, SidebarMenuItemProps>(\n ({ className, ...props }, forwardedRef) => (\n <li {...props} ref={forwardedRef} className={classNames('rt-SidebarMenuItem', className)} />\n ),\n);\nSidebarMenuItem.displayName = 'Sidebar.MenuItem';\n\ninterface SidebarMenuButtonProps extends React.ComponentPropsWithoutRef<'button'> {\n asChild?: boolean;\n isActive?: boolean;\n shortcut?: React.ReactNode;\n badge?: string | BadgeConfig;\n}\n\nconst SidebarMenuButton = React.forwardRef<HTMLButtonElement, SidebarMenuButtonProps>(\n (\n {\n asChild = false,\n isActive = false,\n shortcut,\n badge,\n className,\n children,\n onMouseEnter,\n onMouseLeave,\n onKeyDown,\n ...props\n },\n forwardedRef,\n ) => {\n const [isHighlighted, setIsHighlighted] = React.useState(false);\n const visual = useSidebarVisual();\n const sidebarSize = visual?.size ?? '2';\n\n const Comp = asChild ? Slot : 'button';\n\n const { onClick } = props;\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLButtonElement>) => {\n switch (event.key) {\n case 'Enter':\n case ' ':\n event.preventDefault();\n if (onClick) onClick(event as any);\n break;\n case 'ArrowDown': {\n event.preventDefault();\n // Focus next menu item\n const nextItem = (event.currentTarget as HTMLElement).nextElementSibling?.querySelector(\n '[role=\"menuitem\"]',\n ) as HTMLElement;\n if (nextItem) nextItem.focus();\n break;\n }\n case 'ArrowUp': {\n event.preventDefault();\n // Focus previous menu item\n const prevItem = (\n event.currentTarget as HTMLElement\n ).previousElementSibling?.querySelector('[role=\"menuitem\"]') as HTMLElement;\n if (prevItem) prevItem.focus();\n break;\n }\n }\n onKeyDown?.(event);\n },\n [onClick, onKeyDown],\n );\n\n return (\n <Comp\n {...props}\n ref={forwardedRef}\n role=\"menuitem\"\n aria-current={isActive ? 'page' : undefined}\n className={classNames('rt-reset', 'rt-BaseMenuItem', 'rt-SidebarMenuButton', className)}\n data-active={isActive || undefined}\n data-highlighted={isHighlighted || undefined}\n onKeyDown={handleKeyDown}\n onMouseEnter={(event) => {\n setIsHighlighted(true);\n onMouseEnter?.(event);\n }}\n onMouseLeave={(event) => {\n setIsHighlighted(false);\n onMouseLeave?.(event);\n }}\n >\n {asChild ? (\n children\n ) : (\n <>\n {children}\n {/* Badge with soft variant default and size mapping to sidebar size */}\n {badge && (\n <div className=\"rt-SidebarMenuBadge\">\n {typeof badge === 'string' ? (\n <Badge size={sidebarSize} variant=\"soft\">\n {badge}\n </Badge>\n ) : (\n <Badge\n size={badge.size || sidebarSize}\n variant={badge.variant || 'soft'}\n color={badge.color}\n highContrast={badge.highContrast}\n radius={badge.radius}\n >\n {badge.content}\n </Badge>\n )}\n </div>\n )}\n {shortcut && (\n <div className=\"rt-BaseMenuShortcut rt-SidebarMenuShortcut\">\n <Kbd size={sidebarSize}>{shortcut}</Kbd>\n </div>\n )}\n </>\n )}\n </Comp>\n );\n },\n);\nSidebarMenuButton.displayName = 'Sidebar.MenuButton';\n\n// Sub-menu components using Radix Accordion\ninterface SidebarMenuSubProps extends React.ComponentPropsWithoutRef<'div'> {\n defaultOpen?: boolean;\n}\n\nconst SidebarMenuSub = React.forwardRef<HTMLDivElement, SidebarMenuSubProps>(\n ({ defaultOpen = false, children, ...props }, forwardedRef) => {\n return (\n <div {...props} ref={forwardedRef}>\n <Accordion.Root type=\"single\" collapsible defaultValue={defaultOpen ? 'item' : undefined}>\n <Accordion.Item value=\"item\">{children}</Accordion.Item>\n </Accordion.Root>\n </div>\n );\n },\n);\nSidebarMenuSub.displayName = 'Sidebar.MenuSub';\n\ninterface SidebarMenuSubTriggerProps\n extends React.ComponentPropsWithoutRef<typeof Accordion.Trigger> {\n asChild?: boolean;\n}\n\nconst SidebarMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof Accordion.Trigger>,\n SidebarMenuSubTriggerProps\n>(\n (\n { asChild = false, className, children, onMouseEnter, onMouseLeave, ...props },\n forwardedRef,\n ) => {\n const [isHighlighted, setIsHighlighted] = React.useState(false);\n\n return (\n <Accordion.Header asChild>\n <div>\n <Accordion.Trigger\n {...props}\n ref={forwardedRef}\n asChild={asChild}\n role=\"menuitem\"\n aria-haspopup=\"true\"\n className={classNames(\n 'rt-reset',\n 'rt-BaseMenuItem',\n 'rt-SidebarMenuButton',\n 'rt-SidebarMenuSubTrigger',\n className,\n )}\n data-highlighted={isHighlighted || undefined}\n onMouseEnter={(event) => {\n setIsHighlighted(true);\n onMouseEnter?.(event);\n }}\n onMouseLeave={(event) => {\n setIsHighlighted(false);\n onMouseLeave?.(event);\n }}\n >\n {asChild ? (\n children\n ) : (\n <>\n {children}\n <ThickChevronRightIcon\n className={classNames(\n 'rt-BaseMenuSubTriggerIcon',\n 'rt-SidebarMenuSubTriggerIcon',\n )}\n />\n </>\n )}\n </Accordion.Trigger>\n </div>\n </Accordion.Header>\n );\n },\n);\nSidebarMenuSubTrigger.displayName = 'Sidebar.MenuSubTrigger';\n\ninterface SidebarMenuSubContentProps\n extends React.ComponentPropsWithoutRef<typeof Accordion.Content> {}\n\nconst SidebarMenuSubContent = React.forwardRef<\n React.ElementRef<typeof Accordion.Content>,\n SidebarMenuSubContentProps\n>(({ className, children, ...props }, forwardedRef) => {\n return (\n <Accordion.Content\n {...props}\n ref={forwardedRef}\n className={classNames('rt-SidebarMenuSubContent', className)}\n >\n <div className=\"rt-SidebarMenuSubList\">{children}</div>\n </Accordion.Content>\n );\n});\nSidebarMenuSubContent.displayName = 'Sidebar.MenuSubContent';\n\n// Group components\ninterface SidebarGroupProps extends React.ComponentPropsWithoutRef<'div'> {}\n\nconst SidebarGroup = React.forwardRef<HTMLDivElement, SidebarGroupProps>(\n ({ className, ...props }, forwardedRef) => (\n <div\n {...props}\n ref={forwardedRef}\n className={classNames('rt-BaseMenuGroup', 'rt-SidebarGroup', className)}\n />\n ),\n);\nSidebarGroup.displayName = 'Sidebar.Group';\n\ninterface SidebarGroupLabelProps extends React.ComponentPropsWithoutRef<'div'> {\n asChild?: boolean;\n}\n\nconst SidebarGroupLabel = React.forwardRef<HTMLDivElement, SidebarGroupLabelProps>(\n ({ asChild = false, className, ...props }, forwardedRef) => {\n const Comp = asChild ? Slot : 'div';\n\n return (\n <Comp\n {...props}\n ref={forwardedRef}\n role=\"group\"\n className={classNames('rt-BaseMenuLabel', 'rt-SidebarGroupLabel', className)}\n />\n );\n },\n);\nSidebarGroupLabel.displayName = 'Sidebar.GroupLabel';\n\ninterface SidebarGroupContentProps extends React.ComponentPropsWithoutRef<'div'> {}\n\nconst SidebarGroupContent = React.forwardRef<HTMLDivElement, SidebarGroupContentProps>(\n ({ className, ...props }, forwardedRef) => (\n <div\n {...props}\n ref={forwardedRef}\n className={classNames('rt-SidebarGroupContent', className)}\n />\n ),\n);\nSidebarGroupContent.displayName = 'Sidebar.GroupContent';\n\n// Export all components following shadcn's pattern\nexport {\n Sidebar as Root,\n SidebarContent as Content,\n SidebarHeader as Header,\n SidebarFooter as Footer,\n SidebarSeparator as Separator,\n SidebarMenu as Menu,\n SidebarMenuItem as MenuItem,\n SidebarMenuButton as MenuButton,\n SidebarMenuSub as MenuSub,\n SidebarMenuSubTrigger as MenuSubTrigger,\n SidebarMenuSubContent as MenuSubContent,\n SidebarGroup as Group,\n SidebarGroupLabel as GroupLabel,\n SidebarGroupContent as GroupContent,\n};\n\n/**\n * Enhanced Sidebar Header and Footer Usage Examples:\n *\n * 1. Simple default container (backwards compatible):\n * <Sidebar.Header>\n * <Logo />\n * <span>App Name</span>\n * </Sidebar.Header>\n *\n * 2. Custom flex layout:\n * <Sidebar.Header className=\"rt-justify-between rt-gap-3\">\n * <Logo />\n * <Sidebar.MenuButton>\n * <SettingsIcon />\n * </Sidebar.MenuButton>\n * </Sidebar.Header>\n *\n * 3. Column layout for multiple rows:\n * <Sidebar.Header className=\"rt-flex-col rt-gap-2\" asContainer={false}>\n * <div className=\"rt-flex rt-items-center rt-gap-2\">\n * <Logo />\n * <span>App Name</span>\n * </div>\n * <Sidebar.MenuButton>\n * <UserAvatar />\n * <span>John Doe</span>\n * </Sidebar.MenuButton>\n * </Sidebar.Header>\n *\n * 4. Interactive footer with menu button:\n * <Sidebar.Footer>\n * <Sidebar.MenuButton>\n * <UserIcon />\n * <span>Settings</span>\n * <ChevronUpIcon />\n * </Sidebar.MenuButton>\n * </Sidebar.Footer>\n *\n * 5. Custom footer layout:\n * <Sidebar.Footer className=\"rt-justify-between\">\n * <span>v1.0.0</span>\n * <Sidebar.MenuButton>\n * <HelpIcon />\n * </Sidebar.MenuButton>\n * </Sidebar.Footer>\n *\n * Available utility classes:\n * - Layout: rt-flex-row, rt-flex-col\n * - Alignment: rt-items-center, rt-items-start, rt-items-end\n * - Justification: rt-justify-between, rt-justify-center, rt-justify-start, rt-justify-end\n * - Gap: rt-gap-1, rt-gap-2, rt-gap-3, rt-gap-4\n */\n\nexport type {\n SidebarProps as RootProps,\n SidebarContentProps as ContentProps,\n SidebarHeaderProps as HeaderProps,\n SidebarFooterProps as FooterProps,\n BadgeConfig,\n};\n"],
5
- "mappings": "6kBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,aAAAE,EAAA,WAAAC,EAAA,UAAAC,EAAA,iBAAAC,EAAA,eAAAC,EAAA,WAAAC,EAAA,SAAAC,EAAA,eAAAC,EAAA,aAAAC,EAAA,YAAAC,EAAA,mBAAAC,EAAA,mBAAAC,EAAA,SAAAC,EAAA,cAAAC,IAAA,eAAAC,GAAAhB,IAEA,IAAAiB,EAAuB,oBACvBC,EAAuB,yBACvBC,EAAqB,qBACrBC,EAA2B,wCAE3BC,EAAgC,8BAChCC,EAAgC,sBAEhCC,EAA2B,4BAC3BC,EAA0B,0BAC1BC,EAAsC,sBACtCC,EAA6B,uCAC7BC,EAAoB,oBACpBC,EAAsB,sBAqBtB,MAAMC,EAAuBZ,EAAM,cAAgD,IAAI,EACvF,SAASa,GAAmB,CAC1B,OAAOb,EAAM,WAAWY,CAAoB,CAC9C,CAQA,MAAMf,EAAUG,EAAM,WAAyC,CAACc,EAAOC,IAAiB,CACtF,MAAMC,KAAe,mBAAgB,EAE/B,CACJ,KAAAC,EAAO,kBAAgB,KAAK,QAC5B,QAAAC,EAAU,kBAAgB,QAAQ,QAClC,YAAAC,EAAc,kBAAgB,YAAY,QAC1C,OAAAC,EAAS,kBAAgB,OAAO,QAIhC,gBAAAC,EACA,MAAAC,EACA,aAAAC,EAAe,kBAAgB,aAAa,OAC9C,EAAIT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AAGc,EACJ,IAAKC,EACL,aAAW,EAAAkB,SAAW,yBAA0BT,CAAS,EAC3D,CAEJ,EACApC,EAAoB,YAAc",
6
- "names": ["sidebar_exports", "__export", "SidebarContent", "SidebarFooter", "SidebarGroup", "SidebarGroupContent", "SidebarGroupLabel", "SidebarHeader", "SidebarMenu", "SidebarMenuButton", "SidebarMenuItem", "SidebarMenuSub", "SidebarMenuSubContent", "SidebarMenuSubTrigger", "Sidebar", "SidebarSeparator", "__toCommonJS", "React", "import_classnames", "import_slot", "Accordion", "import_sidebar_props", "import_theme", "import_scroll_area", "import_separator", "import_icons", "import_extract_props", "import_kbd", "import_badge", "SidebarVisualContext", "useSidebarVisual", "props", "forwardedRef", "themeContext", "size", "variant", "menuVariant", "layout", "panelBackground", "color", "highContrast", "className", "children", "rootProps", "_", "__", "safeRootProps", "resolvedColor", "resolvedLayout", "resolvedSize", "classNames", "role", "ariaLabel", "id", "visual", "asContainer", "asChild", "isActive", "shortcut", "badge", "onMouseEnter", "onMouseLeave", "onKeyDown", "isHighlighted", "setIsHighlighted", "sidebarSize", "Comp", "onClick", "handleKeyDown", "event", "nextItem", "prevItem", "defaultOpen"]
4
+ "sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Slot } from './slot.js';\nimport * as Accordion from '@radix-ui/react-accordion';\nimport * as DropdownMenu from './dropdown-menu.js';\n\nimport { sidebarPropDefs } from './sidebar.props.js';\nimport { useThemeContext } from './theme.js';\n// import { IconButton } from './icon-button.js';\nimport { ScrollArea } from './scroll-area.js';\nimport { Separator } from './separator.js';\nimport { ThickChevronRightIcon } from './icons.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { Kbd } from './kbd.js';\nimport { Badge } from './badge.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\nimport type { BadgeProps } from './badge.js';\n\n// Badge configuration type for sidebar menu buttons\ntype BadgeConfig = {\n content: React.ReactNode;\n variant?: BadgeProps['variant'];\n size?: BadgeProps['size'];\n color?: BadgeProps['color'];\n highContrast?: BadgeProps['highContrast'];\n radius?: BadgeProps['radius'];\n};\n\n// Internal presentational context (not exported) for size/menu variant\ntype SidebarVisualContextValue = {\n size: '1' | '2';\n menuVariant: 'solid' | 'soft';\n presentation?: 'thin' | 'expanded';\n color?: string;\n};\nconst SidebarVisualContext = React.createContext<SidebarVisualContextValue | null>(null);\nfunction useSidebarVisual() {\n return React.useContext(SidebarVisualContext);\n}\n\n// Sidebar is now independent of Shell - no integration needed\n\n// Main Sidebar component\ntype SidebarOwnProps = GetPropDefTypes<typeof sidebarPropDefs>;\ninterface SidebarProps extends ComponentPropsWithout<'div', RemovedProps>, SidebarOwnProps {\n /**\n * Presentational mode independent of Shell.\n * 'thin' renders a rail-style sidebar, 'expanded' renders a panel-style sidebar.\n * If both `presentation` and `layout` are provided, `presentation` takes precedence.\n */\n presentation?: 'thin' | 'expanded';\n}\n\nconst Sidebar = React.forwardRef<HTMLDivElement, SidebarProps>((props, forwardedRef) => {\n const themeContext = useThemeContext();\n\n const {\n size = sidebarPropDefs.size.default,\n variant = sidebarPropDefs.variant.default,\n menuVariant = sidebarPropDefs.menuVariant.default,\n layout = sidebarPropDefs.layout.default,\n presentation,\n // type = sidebarPropDefs.type.default,\n // side = sidebarPropDefs.side.default,\n // collapsible = sidebarPropDefs.collapsible.default,\n panelBackground,\n color,\n highContrast = sidebarPropDefs.highContrast.default,\n } = props;\n\n const { className, children, ...rootProps } = extractProps(props, sidebarPropDefs);\n // Remove internal-only props from DOM\n const { asChild: _, panelBackground: __, presentation: ___, ...safeRootProps } = rootProps;\n const resolvedColor = color || themeContext.accentColor;\n\n // Resolve layout (default to 'panel'). `presentation` takes precedence over `layout`.\n const resolvedLayout = presentation === 'thin' ? 'rail' : presentation === 'expanded' ? 'panel' : layout || 'panel';\n\n // Update context with current props - we'll pass the resolved values\n const resolvedSize = typeof size === 'object' ? size.initial || '2' : size;\n return (\n <div {...safeRootProps} ref={forwardedRef} data-accent-color={resolvedColor} className={classNames('rt-SidebarRoot', className)}>\n <SidebarVisualContext.Provider value={{ size: resolvedSize, menuVariant, presentation, color: resolvedColor }}>\n <div\n className={classNames('rt-SidebarContainer', `rt-variant-${variant}`, `rt-r-size-${resolvedSize}`, `rt-menu-variant-${menuVariant}`, resolvedLayout && `rt-layout-${resolvedLayout}`)}\n data-accent-color={resolvedColor}\n data-high-contrast={highContrast || undefined}\n data-panel-background={panelBackground}\n data-presentation={presentation}\n data-layout={resolvedLayout}\n >\n {children}\n </div>\n </SidebarVisualContext.Provider>\n </div>\n );\n});\nSidebar.displayName = 'Sidebar.Root';\n\n// Sidebar content area\ninterface SidebarContentProps extends React.ComponentPropsWithoutRef<'div'> {\n id?: string;\n role?: 'navigation' | 'none';\n 'aria-label'?: string;\n}\n\nconst SidebarContent = React.forwardRef<HTMLDivElement, SidebarContentProps>(\n ({ className, children, role = 'navigation', 'aria-label': ariaLabel = 'Main navigation', id, ...props }, forwardedRef) => {\n const visual = useSidebarVisual();\n const size = visual?.size ?? '2';\n const menuVariant = visual?.menuVariant ?? 'soft';\n\n return (\n <ScrollArea type=\"hover\">\n <div\n {...props}\n ref={forwardedRef}\n id={id}\n role={role}\n aria-label={ariaLabel}\n className={classNames('rt-BaseMenuContent', 'rt-SidebarContent', `rt-r-size-${size}`, `rt-menu-variant-${menuVariant}`, className)}\n >\n <div className=\"rt-BaseMenuViewport\">{children}</div>\n </div>\n </ScrollArea>\n );\n },\n);\nSidebarContent.displayName = 'Sidebar.Content';\n\n// Sidebar header\ninterface SidebarHeaderProps extends React.ComponentPropsWithoutRef<'div'> {\n /**\n * Whether to use the default flex container layout.\n * @default true\n */\n asContainer?: boolean;\n}\n\nconst SidebarHeader = React.forwardRef<HTMLDivElement, SidebarHeaderProps>(({ className, asContainer = true, ...props }, forwardedRef) => {\n const visual = useSidebarVisual();\n const size = visual?.size ?? '2';\n const menuVariant = visual?.menuVariant ?? 'soft';\n\n return (\n <div\n {...props}\n ref={forwardedRef}\n className={classNames(\n 'rt-SidebarHeader',\n `rt-r-size-${size}`,\n `rt-menu-variant-${menuVariant}`,\n {\n 'rt-SidebarHeader--container': asContainer,\n },\n className,\n )}\n />\n );\n});\nSidebarHeader.displayName = 'Sidebar.Header';\n\n// Sidebar footer\ninterface SidebarFooterProps extends React.ComponentPropsWithoutRef<'div'> {\n /**\n * Whether to use the default flex container layout.\n * @default true\n */\n asContainer?: boolean;\n}\n\nconst SidebarFooter = React.forwardRef<HTMLDivElement, SidebarFooterProps>(({ className, asContainer = true, ...props }, forwardedRef) => {\n const visual = useSidebarVisual();\n const size = visual?.size ?? '2';\n const menuVariant = visual?.menuVariant ?? 'soft';\n\n return (\n <div\n {...props}\n ref={forwardedRef}\n className={classNames(\n 'rt-SidebarFooter',\n `rt-r-size-${size}`,\n `rt-menu-variant-${menuVariant}`,\n {\n 'rt-SidebarFooter--container': asContainer,\n },\n className,\n )}\n />\n );\n});\nSidebarFooter.displayName = 'Sidebar.Footer';\n\n// Sidebar trigger button\n// removed Trigger in presentational-only Sidebar\n\n// Removed SidebarInset - not needed\n\n// Sidebar separator\ninterface SidebarSeparatorProps extends ComponentPropsWithout<typeof Separator, RemovedProps> {}\n\nconst SidebarSeparator = React.forwardRef<React.ComponentRef<typeof Separator>, SidebarSeparatorProps>(({ className, ...props }, forwardedRef) => (\n <Separator {...props} ref={forwardedRef} className={classNames('rt-SidebarSeparator', className)} />\n));\nSidebarSeparator.displayName = 'Sidebar.Separator';\n\n// Menu components - reusing dropdown menu structure\ninterface SidebarMenuProps extends React.ComponentPropsWithoutRef<'ul'> {}\n\nconst SidebarMenu = React.forwardRef<HTMLUListElement, SidebarMenuProps>(({ className, ...props }, forwardedRef) => (\n <ul {...props} ref={forwardedRef} role=\"menu\" className={classNames('rt-SidebarMenu', className)} />\n));\nSidebarMenu.displayName = 'Sidebar.Menu';\n\ninterface SidebarMenuItemProps extends React.ComponentPropsWithoutRef<'li'> {}\n\nconst SidebarMenuItem = React.forwardRef<HTMLLIElement, SidebarMenuItemProps>(({ className, ...props }, forwardedRef) => (\n <li {...props} ref={forwardedRef} className={classNames('rt-SidebarMenuItem', className)} />\n));\nSidebarMenuItem.displayName = 'Sidebar.MenuItem';\n\ninterface SidebarMenuButtonProps extends React.ComponentPropsWithoutRef<'button'> {\n asChild?: boolean;\n isActive?: boolean;\n shortcut?: React.ReactNode;\n badge?: string | BadgeConfig;\n}\n\nconst SidebarMenuButton = React.forwardRef<HTMLButtonElement, SidebarMenuButtonProps>(\n ({ asChild = false, isActive = false, shortcut, badge, className, children, onMouseEnter, onMouseLeave, onKeyDown, ...props }, forwardedRef) => {\n const [isHighlighted, setIsHighlighted] = React.useState(false);\n const visual = useSidebarVisual();\n const sidebarSize = visual?.size ?? '2';\n\n const Comp = asChild ? Slot : 'button';\n\n const { onClick } = props;\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLButtonElement>) => {\n switch (event.key) {\n case 'Enter':\n case ' ':\n event.preventDefault();\n if (onClick) onClick(event as any);\n break;\n case 'ArrowDown': {\n event.preventDefault();\n // Focus next menu item\n const nextItem = (event.currentTarget as HTMLElement).nextElementSibling?.querySelector('[role=\"menuitem\"]') as HTMLElement;\n if (nextItem) nextItem.focus();\n break;\n }\n case 'ArrowUp': {\n event.preventDefault();\n // Focus previous menu item\n const prevItem = (event.currentTarget as HTMLElement).previousElementSibling?.querySelector('[role=\"menuitem\"]') as HTMLElement;\n if (prevItem) prevItem.focus();\n break;\n }\n }\n onKeyDown?.(event);\n },\n [onClick, onKeyDown],\n );\n\n // Wrap bare text nodes so CSS can target labels (e.g., for truncation in thin mode)\n const wrapTextNodes = (node: React.ReactNode): React.ReactNode => {\n if (typeof node === 'string' || typeof node === 'number') {\n return <span className=\"rt-SidebarMenuLabel\">{node}</span>;\n }\n if (Array.isArray(node)) {\n return node.map((child, index) => <React.Fragment key={index}>{wrapTextNodes(child)}</React.Fragment>);\n }\n if (React.isValidElement(node)) {\n const el = node as React.ReactElement<any>;\n const className: string = (el.props && (el.props as any).className) || '';\n const isAlreadyLabel = typeof el.type === 'string' && className.split(' ').includes('rt-SidebarMenuLabel');\n if (isAlreadyLabel) return el;\n const newChildren = wrapTextNodes((el.props as any)?.children);\n return React.cloneElement(el, { ...(el.props as any) }, newChildren);\n }\n return node;\n };\n\n const processedChildren = wrapTextNodes(children);\n\n // When rendering asChild, Slot expects a single child element. We still want to\n // append optional badge/shortcut inside that element so they render with Link.\n const slottedChildren = React.useMemo(() => {\n if (!asChild) return null;\n try {\n const onlyChild = React.Children.only(processedChildren as React.ReactElement<any>) as React.ReactElement<any>;\n const originalInnerChildren = (onlyChild.props as any)?.children;\n const enhancedInnerChildren = (\n <>\n {originalInnerChildren}\n {badge && (\n <div className=\"rt-SidebarMenuBadge\">\n {typeof badge === 'string' ? (\n <Badge size={sidebarSize} variant=\"soft\">\n {badge}\n </Badge>\n ) : (\n <Badge size={badge.size || sidebarSize} variant={badge.variant || 'soft'} color={badge.color} highContrast={badge.highContrast} radius={badge.radius}>\n {badge.content}\n </Badge>\n )}\n </div>\n )}\n {shortcut && (\n <div className=\"rt-BaseMenuShortcut rt-SidebarMenuShortcut\">\n <Kbd size={sidebarSize}>{shortcut}</Kbd>\n </div>\n )}\n </>\n );\n return React.cloneElement(onlyChild, { ...(onlyChild.props as any) }, enhancedInnerChildren);\n } catch {\n // Fallback: if multiple children were passed incorrectly, just return processedChildren\n return processedChildren as React.ReactNode;\n }\n }, [asChild, processedChildren, badge, shortcut, sidebarSize]);\n\n return (\n <Comp\n {...props}\n ref={forwardedRef}\n role=\"menuitem\"\n aria-current={isActive ? 'page' : undefined}\n className={classNames('rt-reset', 'rt-BaseMenuItem', 'rt-SidebarMenuButton', className)}\n data-active={isActive || undefined}\n data-highlighted={isHighlighted || undefined}\n onKeyDown={handleKeyDown}\n onMouseEnter={(event) => {\n setIsHighlighted(true);\n onMouseEnter?.(event);\n }}\n onMouseLeave={(event) => {\n setIsHighlighted(false);\n onMouseLeave?.(event);\n }}\n >\n {asChild ? (\n slottedChildren\n ) : (\n <>\n {processedChildren}\n {/* Badge with soft variant default and size mapping to sidebar size */}\n {badge && (\n <div className=\"rt-SidebarMenuBadge\">\n {typeof badge === 'string' ? (\n <Badge size={sidebarSize} variant=\"soft\">\n {badge}\n </Badge>\n ) : (\n <Badge size={badge.size || sidebarSize} variant={badge.variant || 'soft'} color={badge.color} highContrast={badge.highContrast} radius={badge.radius}>\n {badge.content}\n </Badge>\n )}\n </div>\n )}\n {shortcut && (\n <div className=\"rt-BaseMenuShortcut rt-SidebarMenuShortcut\">\n <Kbd size={sidebarSize}>{shortcut}</Kbd>\n </div>\n )}\n </>\n )}\n </Comp>\n );\n },\n);\nSidebarMenuButton.displayName = 'Sidebar.MenuButton';\n\n// Sub-menu components: Accordion in expanded, Dropdown in thin\nconst SidebarSubMenuModeContext = React.createContext<'accordion' | 'dropdown'>('accordion');\ninterface SidebarMenuSubProps extends React.ComponentPropsWithoutRef<'div'> {\n defaultOpen?: boolean;\n}\n\nconst SidebarMenuSub = React.forwardRef<HTMLDivElement, SidebarMenuSubProps>(({ defaultOpen = false, children, ...props }, forwardedRef) => {\n const visual = useSidebarVisual();\n const mode: 'accordion' | 'dropdown' = visual?.presentation === 'thin' ? 'dropdown' : 'accordion';\n\n if (mode === 'dropdown') {\n return (\n <div {...props} ref={forwardedRef}>\n <DropdownMenu.Root>\n <SidebarSubMenuModeContext.Provider value=\"dropdown\">{children}</SidebarSubMenuModeContext.Provider>\n </DropdownMenu.Root>\n </div>\n );\n }\n\n return (\n <div {...props} ref={forwardedRef}>\n <SidebarSubMenuModeContext.Provider value=\"accordion\">\n <Accordion.Root type=\"single\" collapsible defaultValue={defaultOpen ? 'item' : undefined}>\n <Accordion.Item value=\"item\">{children}</Accordion.Item>\n </Accordion.Root>\n </SidebarSubMenuModeContext.Provider>\n </div>\n );\n});\nSidebarMenuSub.displayName = 'Sidebar.MenuSub';\n\ninterface SidebarMenuSubTriggerProps extends React.ComponentPropsWithoutRef<typeof Accordion.Trigger> {\n asChild?: boolean;\n}\n\nconst SidebarMenuSubTrigger = React.forwardRef<React.ElementRef<typeof Accordion.Trigger>, SidebarMenuSubTriggerProps>(\n ({ asChild = false, className, children, onMouseEnter, onMouseLeave, ...props }, forwardedRef) => {\n const [isHighlighted, setIsHighlighted] = React.useState(false);\n const mode = React.useContext(SidebarSubMenuModeContext);\n\n if (mode === 'dropdown') {\n return (\n <DropdownMenu.Trigger>\n <button\n {...(props as any)}\n ref={forwardedRef as any}\n type=\"button\"\n role=\"menuitem\"\n aria-haspopup=\"menu\"\n className={classNames('rt-reset', 'rt-BaseMenuItem', 'rt-SidebarMenuButton', 'rt-SidebarMenuSubTrigger', className)}\n data-highlighted={isHighlighted || undefined}\n onMouseEnter={(event) => {\n setIsHighlighted(true);\n onMouseEnter?.(event as any);\n }}\n onMouseLeave={(event) => {\n setIsHighlighted(false);\n onMouseLeave?.(event as any);\n }}\n >\n {children}\n </button>\n </DropdownMenu.Trigger>\n );\n }\n\n return (\n <Accordion.Header asChild>\n <div>\n <Accordion.Trigger\n {...props}\n ref={forwardedRef}\n asChild={asChild}\n role=\"menuitem\"\n aria-haspopup=\"true\"\n className={classNames('rt-reset', 'rt-BaseMenuItem', 'rt-SidebarMenuButton', 'rt-SidebarMenuSubTrigger', className)}\n data-highlighted={isHighlighted || undefined}\n onMouseEnter={(event) => {\n setIsHighlighted(true);\n onMouseEnter?.(event);\n }}\n onMouseLeave={(event) => {\n setIsHighlighted(false);\n onMouseLeave?.(event);\n }}\n >\n {asChild ? (\n children\n ) : (\n <>\n {children}\n <ThickChevronRightIcon className={classNames('rt-BaseMenuSubTriggerIcon', 'rt-SidebarMenuSubTriggerIcon')} />\n </>\n )}\n </Accordion.Trigger>\n </div>\n </Accordion.Header>\n );\n },\n);\nSidebarMenuSubTrigger.displayName = 'Sidebar.MenuSubTrigger';\n\ninterface SidebarMenuSubContentProps extends React.ComponentPropsWithoutRef<typeof Accordion.Content> {}\n\nconst SidebarMenuSubContent = React.forwardRef<React.ElementRef<typeof Accordion.Content>, SidebarMenuSubContentProps>(({ className, children, ...props }, forwardedRef) => {\n const visual = useSidebarVisual();\n const mode = React.useContext(SidebarSubMenuModeContext);\n\n if (mode === 'dropdown') {\n const unwrapMenuButton = (node: React.ReactNode): React.ReactNode => {\n if (Array.isArray(node)) {\n return node.map((n, i) => <React.Fragment key={i}>{unwrapMenuButton(n)}</React.Fragment>);\n }\n if (React.isValidElement(node)) {\n const typeDisplay = (node.type as any)?.displayName;\n if (typeDisplay === 'Sidebar.MenuButton') {\n return (node.props as any)?.children;\n }\n const child = (node.props as any)?.children;\n if (child !== undefined) {\n return React.cloneElement(node as any, { ...(node.props as any), children: unwrapMenuButton(child) });\n }\n }\n return node;\n };\n\n const normalized = React.Children.map(children as React.ReactNode, (child, index) => {\n if (React.isValidElement(child) && (child.type as any)?.displayName === 'Sidebar.MenuItem') {\n const itemChildren = (child.props as any)?.children;\n const content = unwrapMenuButton(itemChildren);\n return (\n <DropdownMenu.Item key={index} asChild>\n {content as any}\n </DropdownMenu.Item>\n );\n }\n // Fallback: wrap raw nodes too for consistent menu styling\n return (\n <DropdownMenu.Item key={index} asChild>\n {unwrapMenuButton(child) as any}\n </DropdownMenu.Item>\n );\n });\n\n return (\n <DropdownMenu.Content size={visual?.size} variant={visual?.menuVariant} className={classNames(className)}>\n <DropdownMenu.Group>{normalized}</DropdownMenu.Group>\n </DropdownMenu.Content>\n );\n }\n\n return (\n <Accordion.Content {...props} ref={forwardedRef} className={classNames('rt-SidebarMenuSubContent', className)}>\n <div className=\"rt-SidebarMenuSubList\">{children}</div>\n </Accordion.Content>\n );\n});\nSidebarMenuSubContent.displayName = 'Sidebar.MenuSubContent';\n\n// Group components\ninterface SidebarGroupProps extends React.ComponentPropsWithoutRef<'div'> {}\n\nconst SidebarGroup = React.forwardRef<HTMLDivElement, SidebarGroupProps>(({ className, ...props }, forwardedRef) => (\n <div {...props} ref={forwardedRef} className={classNames('rt-BaseMenuGroup', 'rt-SidebarGroup', className)} />\n));\nSidebarGroup.displayName = 'Sidebar.Group';\n\ninterface SidebarGroupLabelProps extends React.ComponentPropsWithoutRef<'div'> {\n asChild?: boolean;\n}\n\nconst SidebarGroupLabel = React.forwardRef<HTMLDivElement, SidebarGroupLabelProps>(({ asChild = false, className, ...props }, forwardedRef) => {\n const Comp = asChild ? Slot : 'div';\n\n return <Comp {...props} ref={forwardedRef} role=\"group\" className={classNames('rt-BaseMenuLabel', 'rt-SidebarGroupLabel', className)} />;\n});\nSidebarGroupLabel.displayName = 'Sidebar.GroupLabel';\n\ninterface SidebarGroupContentProps extends React.ComponentPropsWithoutRef<'div'> {}\n\nconst SidebarGroupContent = React.forwardRef<HTMLDivElement, SidebarGroupContentProps>(({ className, ...props }, forwardedRef) => (\n <div {...props} ref={forwardedRef} className={classNames('rt-SidebarGroupContent', className)} />\n));\nSidebarGroupContent.displayName = 'Sidebar.GroupContent';\n\n// Export all components following shadcn's pattern\nexport {\n Sidebar as Root,\n SidebarContent as Content,\n SidebarHeader as Header,\n SidebarFooter as Footer,\n SidebarSeparator as Separator,\n SidebarMenu as Menu,\n SidebarMenuItem as MenuItem,\n SidebarMenuButton as MenuButton,\n SidebarMenuSub as MenuSub,\n SidebarMenuSubTrigger as MenuSubTrigger,\n SidebarMenuSubContent as MenuSubContent,\n SidebarGroup as Group,\n SidebarGroupLabel as GroupLabel,\n SidebarGroupContent as GroupContent,\n};\n\n/**\n * Enhanced Sidebar Header and Footer Usage Examples:\n *\n * 1. Simple default container (backwards compatible):\n * <Sidebar.Header>\n * <Logo />\n * <span>App Name</span>\n * </Sidebar.Header>\n *\n * 2. Custom flex layout:\n * <Sidebar.Header className=\"rt-justify-between rt-gap-3\">\n * <Logo />\n * <Sidebar.MenuButton>\n * <SettingsIcon />\n * </Sidebar.MenuButton>\n * </Sidebar.Header>\n *\n * 3. Column layout for multiple rows:\n * <Sidebar.Header className=\"rt-flex-col rt-gap-2\" asContainer={false}>\n * <div className=\"rt-flex rt-items-center rt-gap-2\">\n * <Logo />\n * <span>App Name</span>\n * </div>\n * <Sidebar.MenuButton>\n * <UserAvatar />\n * <span>John Doe</span>\n * </Sidebar.MenuButton>\n * </Sidebar.Header>\n *\n * 4. Interactive footer with menu button:\n * <Sidebar.Footer>\n * <Sidebar.MenuButton>\n * <UserIcon />\n * <span>Settings</span>\n * <ChevronUpIcon />\n * </Sidebar.MenuButton>\n * </Sidebar.Footer>\n *\n * 5. Custom footer layout:\n * <Sidebar.Footer className=\"rt-justify-between\">\n * <span>v1.0.0</span>\n * <Sidebar.MenuButton>\n * <HelpIcon />\n * </Sidebar.MenuButton>\n * </Sidebar.Footer>\n *\n * Available utility classes:\n * - Layout: rt-flex-row, rt-flex-col\n * - Alignment: rt-items-center, rt-items-start, rt-items-end\n * - Justification: rt-justify-between, rt-justify-center, rt-justify-start, rt-justify-end\n * - Gap: rt-gap-1, rt-gap-2, rt-gap-3, rt-gap-4\n */\n\nexport type { SidebarProps as RootProps, SidebarContentProps as ContentProps, SidebarHeaderProps as HeaderProps, SidebarFooterProps as FooterProps, BadgeConfig };\n"],
5
+ "mappings": "mlBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,aAAAE,EAAA,WAAAC,EAAA,UAAAC,EAAA,iBAAAC,EAAA,eAAAC,EAAA,WAAAC,EAAA,SAAAC,EAAA,eAAAC,EAAA,aAAAC,EAAA,YAAAC,EAAA,mBAAAC,EAAA,mBAAAC,EAAA,SAAAC,EAAA,cAAAC,IAAA,eAAAC,GAAAhB,IAEA,IAAAiB,EAAuB,oBACvBC,EAAuB,yBACvBC,EAAqB,qBACrBC,EAA2B,wCAC3BC,EAA8B,iCAE9BC,EAAgC,8BAChCC,EAAgC,sBAEhCC,EAA2B,4BAC3BC,GAA0B,0BAC1BC,GAAsC,sBACtCC,GAA6B,uCAC7BC,EAAoB,oBACpBC,EAAsB,sBAuBtB,MAAMC,EAAuBb,EAAM,cAAgD,IAA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qBAIhC,MAAMD,EAAsBY,EAAM,WAAqD,CAAC,CAAE,UAAA0B,EAAW,GAAGX,CAAM,EAAGC,IAC/GhB,EAAA,cAAC,OAAK,GAAGe,EAAO,IAAKC,EAAc,aAAW,EAAAoB,SAAW,yBAA0BV,CAAS,EAAG,CAChG,EACDtC,EAAoB,YAAc",
6
+ "names": ["sidebar_exports", "__export", "SidebarContent", "SidebarFooter", "SidebarGroup", "SidebarGroupContent", "SidebarGroupLabel", "SidebarHeader", "SidebarMenu", "SidebarMenuButton", "SidebarMenuItem", "SidebarMenuSub", "SidebarMenuSubContent", "SidebarMenuSubTrigger", "Sidebar", "SidebarSeparator", "__toCommonJS", "React", "import_classnames", "import_slot", "Accordion", "DropdownMenu", "import_sidebar_props", "import_theme", "import_scroll_area", "import_separator", "import_icons", "import_extract_props", "import_kbd", "import_badge", "SidebarVisualContext", "useSidebarVisual", "props", "forwardedRef", "themeContext", "size", "variant", "menuVariant", "layout", "presentation", "panelBackground", "color", "highContrast", "className", "children", "rootProps", "_", "__", "___", "safeRootProps", "resolvedColor", "resolvedLayout", "resolvedSize", "classNames", "role", "ariaLabel", "id", "visual", "asContainer", "asChild", "isActive", "shortcut", "badge", "onMouseEnter", "onMouseLeave", "onKeyDown", "isHighlighted", "setIsHighlighted", "sidebarSize", "Comp", "onClick", "handleKeyDown", "event", "nextItem", "prevItem", "wrapTextNodes", "node", "child", "index", "el", "newChildren", "processedChildren", "slottedChildren", "onlyChild", "originalInnerChildren", "enhancedInnerChildren", "SidebarSubMenuModeContext", "defaultOpen", "unwrapMenuButton", "n", "i", "normalized", "itemChildren", "content"]
7
7
  }
@@ -1,11 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import { BottomHandle } from './shell-handles.js';
3
- import type { PaneMode, PaneSizePersistence, ResponsivePresentation } from '../shell.types.js';
3
+ import type { Breakpoint, PaneSizePersistence, ResponsivePresentation } from '../shell.types.js';
4
4
  interface PaneProps extends React.ComponentPropsWithoutRef<'div'> {
5
5
  presentation?: ResponsivePresentation;
6
- mode?: PaneMode;
7
- defaultMode?: any;
8
- onModeChange?: (mode: PaneMode) => void;
9
6
  expandedSize?: number;
10
7
  minSize?: number;
11
8
  maxSize?: number;
@@ -23,7 +20,36 @@ interface PaneProps extends React.ComponentPropsWithoutRef<'div'> {
23
20
  paneId?: string;
24
21
  persistence?: PaneSizePersistence;
25
22
  }
26
- type BottomComponent = React.ForwardRefExoticComponent<PaneProps & React.RefAttributes<HTMLDivElement>> & {
23
+ type BottomOpenChangeMeta = {
24
+ reason: 'init' | 'toggle' | 'responsive';
25
+ };
26
+ type BottomControlledProps = {
27
+ open: boolean | Partial<Record<Breakpoint, boolean>>;
28
+ onOpenChange?: (open: boolean, meta: BottomOpenChangeMeta) => void;
29
+ defaultOpen?: never;
30
+ };
31
+ type BottomUncontrolledProps = {
32
+ defaultOpen?: boolean;
33
+ onOpenChange?: (open: boolean, meta: BottomOpenChangeMeta) => void;
34
+ open?: never;
35
+ };
36
+ type BottomSizeControlledProps = {
37
+ size: number | string;
38
+ defaultSize?: never;
39
+ };
40
+ type BottomSizeUncontrolledProps = {
41
+ defaultSize?: number | string;
42
+ size?: never;
43
+ };
44
+ type BottomSizeChangeMeta = {
45
+ reason: 'init' | 'resize' | 'controlled';
46
+ };
47
+ type BottomPublicProps = PaneProps & (BottomControlledProps | BottomUncontrolledProps) & (BottomSizeControlledProps | BottomSizeUncontrolledProps) & {
48
+ onSizeChange?: (size: number, meta: BottomSizeChangeMeta) => void;
49
+ sizeUpdate?: 'throttle' | 'debounce';
50
+ sizeUpdateMs?: number;
51
+ };
52
+ type BottomComponent = React.ForwardRefExoticComponent<BottomPublicProps & React.RefAttributes<HTMLDivElement>> & {
27
53
  Handle: typeof BottomHandle;
28
54
  };
29
55
  export declare const Bottom: BottomComponent;
@@ -1 +1 @@
1
- {"version":3,"file":"shell-bottom.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/shell-bottom.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK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AAa,CAAC,cAAc,CAAC,CAAC,GAAG;IAAE,MAAM,EAAE,OAAO,YAAY,CAAA;CAAE,CAAC;AAElJ,eAAO,MAAM,MAAM,EAuUd,eAAe,CAAC"}
@@ -1,2 +1,2 @@
1
- import*as o from"react";import X from"classnames";import*as k from"../sheet.js";import{VisuallyHidden as Y}from"../visually-hidden.js";import{useShell as Z}from"../shell.context.js";import{useResponsivePresentation as _}from"../shell.hooks.js";import{PaneResizeContext as ee}from"./shell-resize.js";import{BottomHandle as M,PaneHandle as te}from"./shell-handles.js";import{BREAKPOINTS as oe}from"../shell.types.js";const O=o.forwardRef(({className:$,presentation:D="fixed",mode:a,defaultMode:i="collapsed",onModeChange:h,expandedSize:c=200,minSize:E=100,maxSize:x=400,resizable:m=!1,collapsible:I=!0,onExpand:g,onCollapse:S,onResize:p,onResizeStart:L,onResizeEnd:V,snapPoints:K,snapTolerance:j,collapseThreshold:q,paneId:f,persistence:b,children:F,style:W,...G},s)=>{const t=Z(),B=_(D),l=B==="overlay",J=B==="stacked",d=o.useRef(null),Q=o.useCallback(e=>{d.current=e,typeof s=="function"?s(e):s&&(s.current=e)},[s]),C=o.Children.toArray(F),z=C.filter(e=>o.isValidElement(e)&&e.type===M),T=C.filter(e=>!(o.isValidElement(e)&&e.type===M)),y=o.useCallback(()=>{if(typeof i=="string")return i;const e=i;if(e&&e[t.currentBreakpoint])return e[t.currentBreakpoint];const r=[...Object.keys(oe)].reverse().concat("initial"),R=r.indexOf(t.currentBreakpoint);for(let v=R+1;v<r.length;v++){const A=r[v];if(e&&e[A])return e[A]}return"collapsed"},[i,t.currentBreakpoint]),H=o.useRef(!1);o.useEffect(()=>{if(!H.current&&(H.current=!0,a===void 0)){const e=y();t.bottomMode!==e&&t.setBottomMode(e)}},[]);const w=o.useRef(null),N=o.useRef(null);o.useEffect(()=>{if(a!==void 0||!t.currentBreakpointReady||w.current===t.currentBreakpoint)return;w.current=t.currentBreakpoint;const e=y();N.current!==e&&(N.current=e,e!==t.bottomMode&&t.setBottomMode(e))},[a,t.currentBreakpoint,t.currentBreakpointReady,y,t.bottomMode,t.setBottomMode]),o.useEffect(()=>{a!==void 0&&t.bottomMode!==a&&t.setBottomMode(a)},[a,t]),o.useEffect(()=>{a===void 0&&h?.(t.bottomMode)},[t.bottomMode,a,h]),o.useEffect(()=>{t.bottomMode==="expanded"?g?.():S?.()},[t.bottomMode,g,S]);const P=t.bottomMode==="expanded",u=o.useMemo(()=>{if(!f||b)return b;const e=`kookie-ui:shell:bottom:${f}`;return{load:()=>{if(typeof window>"u")return;const r=window.localStorage.getItem(e);return r?Number(r):void 0},save:r=>{typeof window>"u"||window.localStorage.setItem(e,String(r))}}},[f,b]);o.useEffect(()=>{let e=!0;return(async()=>{if(!m||!u?.load||l)return;const n=await u.load();e&&typeof n=="number"&&d.current&&(d.current.style.setProperty("--bottom-size",`${n}px`),p?.(n))})(),()=>{e=!1}},[m,u,p,l]);const U=m&&!l&&P?o.createElement(ee.Provider,{value:{containerRef:d,cssVarName:"--bottom-size",minSize:E,maxSize:x,defaultSize:c,orientation:"horizontal",edge:"start",computeNext:(e,n,r)=>{const R=e-n;return r-R},onResize:p,onResizeStart:L,onResizeEnd:e=>{V?.(e),u?.save?.(e)},target:"bottom",collapsible:I,snapPoints:K,snapTolerance:j??8,collapseThreshold:q,requestCollapse:()=>t.setBottomMode("collapsed"),requestToggle:()=>t.togglePane("bottom")}},z.length>0?z.map((e,n)=>o.cloneElement(e,{key:e.key??n})):o.createElement(te,null)):null;if(l){const e=t.bottomMode==="expanded";return o.createElement(k.Root,{open:e,onOpenChange:n=>t.setBottomMode(n?"expanded":"collapsed")},o.createElement(k.Content,{side:"bottom",style:{padding:0},height:{initial:`${c}px`}},o.createElement(Y,null,o.createElement(k.Title,null,"Bottom panel")),T))}return o.createElement("div",{...G,ref:Q,className:X("rt-ShellBottom",$),"data-mode":t.bottomMode,"data-peek":t.peekTarget==="bottom"||void 0,"data-presentation":B,"data-open":J&&P||void 0,style:{...W,"--bottom-size":`${c}px`,"--bottom-min-size":`${E}px`,"--bottom-max-size":`${x}px`}},o.createElement("div",{className:"rt-ShellBottomContent","data-visible":P||void 0},T),U)});O.displayName="Shell.Bottom",O.Handle=M;export{O as Bottom};
1
+ import*as t from"react";import se from"classnames";import*as w from"../sheet.js";import{VisuallyHidden as ie}from"../visually-hidden.js";import{useShell as ae}from"../shell.context.js";import{useResponsivePresentation as de,useResponsiveValue as A}from"../shell.hooks.js";import{PaneResizeContext as le}from"./shell-resize.js";import{BottomHandle as O,PaneHandle as ue}from"./shell-handles.js";import"../shell.types.js";const L=t.forwardRef(({className:W,presentation:j="fixed",defaultOpen:f,open:a,onOpenChange:z,expandedSize:P=200,minSize:l=100,maxSize:u=400,resizable:g=!1,collapsible:q=!0,onExpand:k,onCollapse:T,onResize:B,onResizeStart:K,onResizeEnd:G,snapPoints:J,snapTolerance:Q,collapseThreshold:X,paneId:M,persistence:C,children:Y,style:Z,...i},c)=>{const o=ae(),R=de(j),p=R==="overlay",ee=R==="stacked",d=t.useRef(null),te=t.useCallback(e=>{d.current=e,typeof c=="function"?c(e):c&&(c.current=e)},[c]),D=t.Children.toArray(Y),H=D.filter(e=>t.isValidElement(e)&&e.type===O),U=D.filter(e=>!(t.isValidElement(e)&&e.type===O)),b=t.useMemo(()=>{const e=i.onSizeChange,n=i.sizeUpdate,s=i.sizeUpdateMs??50;if(!e)return()=>{};if(n==="debounce"){let r=null;return(m,N)=>{r&&clearTimeout(r),r=setTimeout(()=>{e(m,N)},s)}}if(n==="throttle"){let r=0;return(m,N)=>{const V=Date.now();V-r>=s&&(r=V,e(m,N))}}return(r,m)=>e(r,m)},[i.onSizeChange,i.sizeUpdate,i.sizeUpdateMs]),F=t.useRef(!1),ne=t.useRef(!1),I=A(f);t.useEffect(()=>{if(!F.current&&o.currentBreakpointReady&&(F.current=!0,typeof a>"u"&&typeof f<"u")){const e=!!I;o.setBottomMode(e?"expanded":"collapsed"),ne.current=!0}},[o.currentBreakpointReady,a,f,I]);const y=t.useRef(null);t.useEffect(()=>{const e=typeof a<"u";if(y.current===null){y.current=e;return}y.current!==e&&(console.warn("Shell.Bottom: Switching between controlled and uncontrolled `open` is not supported."),y.current=e)},[a]),t.useEffect(()=>{typeof a>"u"||o.setBottomMode(a?"expanded":"collapsed")},[a]);const _=t.useRef(!1),S=A(a);t.useEffect(()=>{if(typeof S>"u")return;const e=!!S;o.setBottomMode(e?"expanded":"collapsed")},[S]);const $=t.useRef(!1),v=t.useRef(null);t.useEffect(()=>{!$.current&&typeof a>"u"&&f&&o.bottomMode==="expanded"&&(z?.(!0,{reason:"init"}),$.current=!0),typeof a>"u"&&(v.current!==null&&v.current!==o.bottomMode&&(_.current||z?.(o.bottomMode==="expanded",{reason:"toggle"}),_.current=!1),v.current=o.bottomMode)},[o.bottomMode,a,f,z]),t.useEffect(()=>{o.bottomMode==="expanded"?k?.():T?.()},[o.bottomMode,k,T]);const x=o.bottomMode==="expanded",h=t.useMemo(()=>{if(!M||C)return C;const e=`kookie-ui:shell:bottom:${M}`;return{load:()=>{if(typeof window>"u")return;const s=window.localStorage.getItem(e);return s?Number(s):void 0},save:s=>{typeof window>"u"||window.localStorage.setItem(e,String(s))}}},[M,C]);t.useEffect(()=>{let e=!0;return(async()=>{if(!g||!h?.load||p)return;const n=await h.load();e&&typeof n=="number"&&d.current&&(d.current.style.setProperty("--bottom-size",`${n}px`),B?.(n))})(),()=>{e=!1}},[g,h,B,p]);const oe=g&&!p&&x?t.createElement(le.Provider,{value:{containerRef:d,cssVarName:"--bottom-size",minSize:l,maxSize:u,defaultSize:P,orientation:"horizontal",edge:"start",computeNext:(e,n,s)=>{const r=e-n;return s-r},onResize:B,onResizeStart:K,onResizeEnd:e=>{G?.(e),b(e,{reason:"resize"}),h?.save?.(e)},target:"bottom",collapsible:q,snapPoints:J,snapTolerance:Q??8,collapseThreshold:X,requestCollapse:()=>o.setBottomMode("collapsed"),requestToggle:()=>o.togglePane("bottom")}},H.length>0?H.map((e,n)=>t.cloneElement(e,{key:e.key??n})):t.createElement(ue,null)):null,{defaultOpen:me,open:fe,onOpenChange:ce,size:pe,defaultSize:be,onSizeChange:ye,sizeUpdate:he,sizeUpdateMs:ze,...re}=i,E=t.useCallback(e=>{if(e==null)return;if(typeof e=="number"&&Number.isFinite(e))return e;const n=String(e).trim();if(!n)return;if(n.endsWith("px"))return Number.parseFloat(n);if(n.endsWith("rem")){const r=Number.parseFloat(getComputedStyle(document.documentElement).fontSize||"16")||16;return Number.parseFloat(n)*r}if(n.endsWith("%")){const r=Number.parseFloat(n),m=document.documentElement.clientHeight||window.innerHeight||0;return r/100*m}const s=Number.parseFloat(n);return Number.isFinite(s)?s:void 0},[]);if(t.useEffect(()=>{if(d.current&&typeof i.size>"u"&&typeof i.defaultSize<"u"){const e=E(i.defaultSize);if(typeof e=="number"&&Number.isFinite(e)){const r=Math.min((typeof u=="number"?u:void 0)??e,Math.max((typeof l=="number"?l:void 0)??e,e));d.current.style.setProperty("--bottom-size",`${r}px`),b(r,{reason:"init"})}}},[]),t.useEffect(()=>{if(!d.current||typeof i.size>"u")return;const e=E(i.size);if(typeof e=="number"&&Number.isFinite(e)){const r=Math.min((typeof u=="number"?u:void 0)??e,Math.max((typeof l=="number"?l:void 0)??e,e));d.current.style.setProperty("--bottom-size",`${r}px`),b(r,{reason:"controlled"})}},[i.size,l,u,E,b]),p){const e=o.bottomMode==="expanded";return t.createElement(w.Root,{open:e,onOpenChange:n=>o.setBottomMode(n?"expanded":"collapsed")},t.createElement(w.Content,{side:"bottom",style:{padding:0},height:{initial:`${P}px`}},t.createElement(ie,null,t.createElement(w.Title,null,"Bottom panel")),U))}return t.createElement("div",{...re,ref:te,className:se("rt-ShellBottom",W),"data-mode":o.bottomMode,"data-peek":o.peekTarget==="bottom"||void 0,"data-presentation":o.currentBreakpointReady?R:void 0,"data-open":o.currentBreakpointReady&&ee&&x||void 0,style:{...Z,"--bottom-size":`${P}px`,"--bottom-min-size":`${l}px`,"--bottom-max-size":`${u}px`}},t.createElement("div",{className:"rt-ShellBottomContent","data-visible":x||void 0},U),oe)});L.displayName="Shell.Bottom",L.Handle=O;export{L as Bottom};
2
2
  //# sourceMappingURL=shell-bottom.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/components/_internal/shell-bottom.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport * as Sheet from '../sheet.js';\nimport { VisuallyHidden } from '../visually-hidden.js';\nimport { useShell } from '../shell.context.js';\nimport { useResponsivePresentation } from '../shell.hooks.js';\nimport { PaneResizeContext } from './shell-resize.js';\nimport { BottomHandle, PaneHandle } from './shell-handles.js';\nimport { BREAKPOINTS } from '../shell.types.js';\nimport type { Breakpoint, PaneMode, PaneSizePersistence, ResponsivePresentation } from '../shell.types.js';\n\ninterface PaneProps extends React.ComponentPropsWithoutRef<'div'> {\n presentation?: ResponsivePresentation;\n mode?: PaneMode;\n defaultMode?: any;\n onModeChange?: (mode: PaneMode) => void;\n expandedSize?: number;\n minSize?: number;\n maxSize?: number;\n resizable?: boolean;\n collapsible?: boolean;\n onExpand?: () => void;\n onCollapse?: () => void;\n onResize?: (size: number) => void;\n resizer?: React.ReactNode;\n onResizeStart?: (size: number) => void;\n onResizeEnd?: (size: number) => void;\n snapPoints?: number[];\n snapTolerance?: number;\n collapseThreshold?: number;\n paneId?: string;\n persistence?: PaneSizePersistence;\n}\n\ntype BottomComponent = React.ForwardRefExoticComponent<PaneProps & React.RefAttributes<HTMLDivElement>> & { Handle: typeof BottomHandle };\n\nexport const Bottom = React.forwardRef<HTMLDivElement, PaneProps>(\n (\n {\n className,\n presentation = 'fixed',\n mode,\n defaultMode = 'collapsed',\n onModeChange,\n expandedSize = 200,\n minSize = 100,\n maxSize = 400,\n resizable = false,\n collapsible = true,\n onExpand,\n onCollapse,\n onResize,\n onResizeStart,\n onResizeEnd,\n snapPoints,\n snapTolerance,\n collapseThreshold,\n paneId,\n persistence,\n children,\n style,\n ...props\n },\n ref,\n ) => {\n const shell = useShell();\n const resolvedPresentation = useResponsivePresentation(presentation);\n const isOverlay = resolvedPresentation === 'overlay';\n const isStacked = resolvedPresentation === 'stacked';\n const localRef = React.useRef<HTMLDivElement | null>(null);\n const setRef = React.useCallback(\n (node: HTMLDivElement | null) => {\n localRef.current = node;\n if (typeof ref === 'function') ref(node);\n else if (ref) (ref as React.MutableRefObject<HTMLDivElement | null>).current = node;\n },\n [ref],\n );\n const childArray = React.Children.toArray(children) as React.ReactElement[];\n const handleChildren = childArray.filter((el: React.ReactElement) => React.isValidElement(el) && el.type === BottomHandle);\n const contentChildren = childArray.filter((el: React.ReactElement) => !(React.isValidElement(el) && el.type === BottomHandle));\n\n const resolveResponsiveMode = React.useCallback((): PaneMode => {\n if (typeof defaultMode === 'string') return defaultMode as PaneMode;\n const dm = defaultMode as Partial<Record<Breakpoint, PaneMode>> | undefined;\n if (dm && dm[shell.currentBreakpoint as Breakpoint]) {\n return dm[shell.currentBreakpoint as Breakpoint] as PaneMode;\n }\n const bpKeys = Object.keys(BREAKPOINTS) as Array<keyof typeof BREAKPOINTS>;\n const order: Breakpoint[] = ([...bpKeys].reverse() as Breakpoint[]).concat('initial' as Breakpoint);\n const startIdx = order.indexOf(shell.currentBreakpoint as Breakpoint);\n for (let i = startIdx + 1; i < order.length; i++) {\n const bp = order[i];\n if (dm && dm[bp]) {\n return dm[bp] as PaneMode;\n }\n }\n return 'collapsed';\n }, [defaultMode, shell.currentBreakpoint]);\n\n const didInitRef = React.useRef(false);\n React.useEffect(() => {\n if (didInitRef.current) return;\n didInitRef.current = true;\n if (mode === undefined) {\n const initial = resolveResponsiveMode();\n if (shell.bottomMode !== initial) shell.setBottomMode(initial);\n }\n }, []);\n\n const lastBottomBpRef = React.useRef<Breakpoint | null>(null);\n const lastResolvedBottomRef = React.useRef<PaneMode | null>(null);\n React.useEffect(() => {\n if (mode !== undefined) return;\n if (!shell.currentBreakpointReady) return;\n if (lastBottomBpRef.current === shell.currentBreakpoint) return;\n lastBottomBpRef.current = shell.currentBreakpoint as Breakpoint;\n const next = resolveResponsiveMode();\n if (lastResolvedBottomRef.current === next) return;\n lastResolvedBottomRef.current = next;\n if (next !== shell.bottomMode) shell.setBottomMode(next);\n }, [mode, shell.currentBreakpoint, shell.currentBreakpointReady, resolveResponsiveMode, shell.bottomMode, shell.setBottomMode]);\n\n React.useEffect(() => {\n if (mode !== undefined && shell.bottomMode !== mode) {\n shell.setBottomMode(mode);\n }\n }, [mode, shell]);\n\n React.useEffect(() => {\n if (mode === undefined) {\n onModeChange?.(shell.bottomMode);\n }\n }, [shell.bottomMode, mode, onModeChange]);\n\n React.useEffect(() => {\n if (shell.bottomMode === 'expanded') {\n onExpand?.();\n } else {\n onCollapse?.();\n }\n }, [shell.bottomMode, onExpand, onCollapse]);\n\n const isExpanded = shell.bottomMode === 'expanded';\n\n const persistenceAdapter = React.useMemo(() => {\n if (!paneId || persistence) return persistence;\n const key = `kookie-ui:shell:bottom:${paneId}`;\n const adapter: PaneSizePersistence = {\n load: () => {\n if (typeof window === 'undefined') return undefined;\n const v = window.localStorage.getItem(key);\n return v ? Number(v) : undefined;\n },\n save: (size: number) => {\n if (typeof window === 'undefined') return;\n window.localStorage.setItem(key, String(size));\n },\n };\n return adapter;\n }, [paneId, persistence]);\n\n React.useEffect(() => {\n let mounted = true;\n (async () => {\n if (!resizable || !persistenceAdapter?.load || isOverlay) return;\n const loaded = await persistenceAdapter.load();\n if (mounted && typeof loaded === 'number' && localRef.current) {\n localRef.current.style.setProperty('--bottom-size', `${loaded}px`);\n onResize?.(loaded);\n }\n })();\n return () => {\n mounted = false;\n };\n }, [resizable, persistenceAdapter, onResize, isOverlay]);\n\n const handleEl =\n resizable && !isOverlay && isExpanded ? (\n <PaneResizeContext.Provider\n value={{\n containerRef: localRef,\n cssVarName: '--bottom-size',\n minSize,\n maxSize,\n defaultSize: expandedSize,\n orientation: 'horizontal',\n edge: 'start',\n computeNext: (client, startClient, startSize) => {\n const delta = client - startClient;\n return startSize - delta;\n },\n onResize,\n onResizeStart,\n onResizeEnd: (size) => {\n onResizeEnd?.(size);\n persistenceAdapter?.save?.(size);\n },\n target: 'bottom',\n collapsible,\n snapPoints,\n snapTolerance: snapTolerance ?? 8,\n collapseThreshold,\n requestCollapse: () => shell.setBottomMode('collapsed'),\n requestToggle: () => shell.togglePane('bottom'),\n }}\n >\n {handleChildren.length > 0 ? handleChildren.map((el, i) => React.cloneElement(el, { key: el.key ?? i })) : <PaneHandle />}\n </PaneResizeContext.Provider>\n ) : null;\n\n if (isOverlay) {\n const open = shell.bottomMode === 'expanded';\n return (\n <Sheet.Root open={open} onOpenChange={(o) => shell.setBottomMode(o ? 'expanded' : 'collapsed')}>\n <Sheet.Content side=\"bottom\" style={{ padding: 0 }} height={{ initial: `${expandedSize}px` }}>\n <VisuallyHidden>\n <Sheet.Title>Bottom panel</Sheet.Title>\n </VisuallyHidden>\n {contentChildren}\n </Sheet.Content>\n </Sheet.Root>\n );\n }\n\n return (\n <div\n {...props}\n ref={setRef}\n className={classNames('rt-ShellBottom', className)}\n data-mode={shell.bottomMode}\n data-peek={shell.peekTarget === 'bottom' || undefined}\n data-presentation={resolvedPresentation}\n data-open={(isStacked && isExpanded) || undefined}\n style={{\n ...style,\n ['--bottom-size' as any]: `${expandedSize}px`,\n ['--bottom-min-size' as any]: `${minSize}px`,\n ['--bottom-max-size' as any]: `${maxSize}px`,\n }}\n >\n <div className=\"rt-ShellBottomContent\" data-visible={isExpanded || undefined}>\n {contentChildren}\n </div>\n {handleEl}\n </div>\n );\n },\n) as BottomComponent;\nBottom.displayName = 'Shell.Bottom';\nBottom.Handle = BottomHandle;\n"],
5
- "mappings": "AAAA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aACvB,UAAYC,MAAW,cACvB,OAAS,kBAAAC,MAAsB,wBAC/B,OAAS,YAAAC,MAAgB,sBACzB,OAAS,6BAAAC,MAAiC,oBAC1C,OAAS,qBAAAC,OAAyB,oBAClC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BH,GAAoB,OAAOG,CAAI,CACjC,EACA,OAAQ,SACR,YAAAzC,EACA,WAAAM,EACA,cAAeC,GAAiB,EAChC,kBAAAC,EACA,gBAAiB,IAAMO,EAAM,cAAc,WAAW,EACtD,cAAe,IAAMA,EAAM,WAAW,QAAQ,CAChD,GAECQ,EAAe,OAAS,EAAIA,EAAe,IAAI,CAACC,EAAIM,IAAMlD,EAAM,aAAa4C,EAAI,CAAE,IAAKA,EAAG,KAAOM,CAAE,CAAC,CAAC,EAAIlD,EAAA,cAACQ,GAAA,IAAW,CACzH,EACE,KAEN,GAAI6B,EAAW,CACb,MAAMgC,EAAOlC,EAAM,aAAe,WAClC,OACEnC,EAAA,cAACE,EAAM,KAAN,CAAW,KAAMmE,EAAM,aAAeC,GAAMnC,EAAM,cAAcmC,EAAI,WAAa,WAAW,GAC3FtE,EAAA,cAACE,EAAM,QAAN,CAAc,KAAK,SAAS,MAAO,CAAE,QAAS,CAAE,EAAG,OAAQ,CAAE,QAAS,GAAGc,CAAY,IAAK,GACzFhB,EAAA,cAACG,EAAA,KACCH,EAAA,cAACE,EAAM,MAAN,KAAY,cAAY,CAC3B,EACC2C,CACH,CACF,CAEJ,CAEA,OACE7C,EAAA,cAAC,OACE,GAAGiC,EACJ,IAAKO,EACL,UAAWvC,EAAW,iBAAkBU,CAAS,EACjD,YAAWwB,EAAM,WACjB,YAAWA,EAAM,aAAe,UAAY,OAC5C,oBAAmBC,EACnB,YAAYE,GAAamB,GAAe,OACxC,MAAO,CACL,GAAGzB,EACF,gBAAyB,GAAGhB,CAAY,KACxC,oBAA6B,GAAGC,CAAO,KACvC,oBAA6B,GAAGC,CAAO,IAC1C,GAEAlB,EAAA,cAAC,OAAI,UAAU,wBAAwB,eAAcyD,GAAc,QAChEZ,CACH,EACCmB,CACH,CAEJ,CACF,EACAtD,EAAO,YAAc,eACrBA,EAAO,OAASH",
6
- "names": ["React", "classNames", "Sheet", "VisuallyHidden", "useShell", "useResponsivePresentation", "PaneResizeContext", "BottomHandle", "PaneHandle", "BREAKPOINTS", "Bottom", "className", "presentation", "mode", "defaultMode", "onModeChange", "expandedSize", "minSize", "maxSize", "resizable", "collapsible", "onExpand", "onCollapse", "onResize", "onResizeStart", "onResizeEnd", "snapPoints", "snapTolerance", "collapseThreshold", "paneId", "persistence", "children", "style", "props", "ref", "shell", "resolvedPresentation", "isOverlay", "isStacked", "localRef", "setRef", "node", "childArray", "handleChildren", "el", "contentChildren", "resolveResponsiveMode", "dm", "order", "startIdx", "i", "bp", "didInitRef", "initial", "lastBottomBpRef", "lastResolvedBottomRef", "next", "isExpanded", "persistenceAdapter", "key", "v", "size", "mounted", "loaded", "handleEl", "client", "startClient", "startSize", "delta", "open", "o"]
4
+ "sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport * as Sheet from '../sheet.js';\nimport { VisuallyHidden } from '../visually-hidden.js';\nimport { useShell } from '../shell.context.js';\nimport { useResponsivePresentation, useResponsiveValue } from '../shell.hooks.js';\nimport { PaneResizeContext } from './shell-resize.js';\nimport { BottomHandle, PaneHandle } from './shell-handles.js';\nimport { BREAKPOINTS } from '../shell.types.js';\nimport type { Breakpoint, PaneMode, PaneSizePersistence, ResponsivePresentation } from '../shell.types.js';\n\ninterface PaneProps extends React.ComponentPropsWithoutRef<'div'> {\n presentation?: ResponsivePresentation;\n // legacy mode removed\n expandedSize?: number;\n minSize?: number;\n maxSize?: number;\n resizable?: boolean;\n collapsible?: boolean;\n onExpand?: () => void;\n onCollapse?: () => void;\n onResize?: (size: number) => void;\n resizer?: React.ReactNode;\n onResizeStart?: (size: number) => void;\n onResizeEnd?: (size: number) => void;\n snapPoints?: number[];\n snapTolerance?: number;\n collapseThreshold?: number;\n paneId?: string;\n persistence?: PaneSizePersistence;\n}\n\ntype BottomOpenChangeMeta = { reason: 'init' | 'toggle' | 'responsive' };\ntype BottomControlledProps = { open: boolean | Partial<Record<Breakpoint, boolean>>; onOpenChange?: (open: boolean, meta: BottomOpenChangeMeta) => void; defaultOpen?: never };\ntype BottomUncontrolledProps = { defaultOpen?: boolean; onOpenChange?: (open: boolean, meta: BottomOpenChangeMeta) => void; open?: never };\ntype BottomSizeControlledProps = { size: number | string; defaultSize?: never };\ntype BottomSizeUncontrolledProps = { defaultSize?: number | string; size?: never };\ntype BottomSizeChangeMeta = { reason: 'init' | 'resize' | 'controlled' };\ntype BottomPublicProps = PaneProps &\n (BottomControlledProps | BottomUncontrolledProps) &\n (BottomSizeControlledProps | BottomSizeUncontrolledProps) & {\n onSizeChange?: (size: number, meta: BottomSizeChangeMeta) => void;\n sizeUpdate?: 'throttle' | 'debounce';\n sizeUpdateMs?: number;\n };\n\ntype BottomComponent = React.ForwardRefExoticComponent<BottomPublicProps & React.RefAttributes<HTMLDivElement>> & { Handle: typeof BottomHandle };\n\nexport const Bottom = React.forwardRef<HTMLDivElement, BottomPublicProps>(\n (\n {\n className,\n presentation = 'fixed',\n // removed legacy props\n // new API\n defaultOpen,\n open,\n onOpenChange,\n expandedSize = 200,\n minSize = 100,\n maxSize = 400,\n resizable = false,\n collapsible = true,\n onExpand,\n onCollapse,\n onResize,\n onResizeStart,\n onResizeEnd,\n snapPoints,\n snapTolerance,\n collapseThreshold,\n paneId,\n persistence,\n children,\n style,\n ...props\n },\n ref,\n ) => {\n const shell = useShell();\n const resolvedPresentation = useResponsivePresentation(presentation);\n const isOverlay = resolvedPresentation === 'overlay';\n const isStacked = resolvedPresentation === 'stacked';\n const localRef = React.useRef<HTMLDivElement | null>(null);\n const setRef = React.useCallback(\n (node: HTMLDivElement | null) => {\n localRef.current = node;\n if (typeof ref === 'function') ref(node);\n else if (ref) (ref as React.MutableRefObject<HTMLDivElement | null>).current = node;\n },\n [ref],\n );\n const childArray = React.Children.toArray(children) as React.ReactElement[];\n const handleChildren = childArray.filter((el: React.ReactElement) => React.isValidElement(el) && el.type === BottomHandle);\n const contentChildren = childArray.filter((el: React.ReactElement) => !(React.isValidElement(el) && el.type === BottomHandle));\n\n // Throttled/debounced emitter for onSizeChange\n const emitSizeChange = React.useMemo(() => {\n const cb = (props as any).onSizeChange as undefined | ((s: number, meta: BottomSizeChangeMeta) => void);\n const strategy = (props as any).sizeUpdate as undefined | 'throttle' | 'debounce';\n const ms = (props as any).sizeUpdateMs ?? 50;\n if (!cb) return () => {};\n if (strategy === 'debounce') {\n let t: any = null;\n return (s: number, meta: BottomSizeChangeMeta) => {\n if (t) clearTimeout(t);\n t = setTimeout(() => {\n cb(s, meta);\n }, ms);\n };\n }\n if (strategy === 'throttle') {\n let last = 0;\n return (s: number, meta: BottomSizeChangeMeta) => {\n const now = Date.now();\n if (now - last >= ms) {\n last = now;\n cb(s, meta);\n }\n };\n }\n return (s: number, meta: BottomSizeChangeMeta) => cb(s, meta);\n }, [(props as any).onSizeChange, (props as any).sizeUpdate, (props as any).sizeUpdateMs]);\n\n const didInitRef = React.useRef(false);\n const didInitFromDefaultOpenRef = React.useRef(false);\n const resolvedDefaultOpen = useResponsiveValue(defaultOpen as any);\n React.useEffect(() => {\n if (didInitRef.current) return;\n if (!shell.currentBreakpointReady) return;\n didInitRef.current = true;\n if (typeof open === 'undefined' && typeof defaultOpen !== 'undefined') {\n const initial = Boolean(resolvedDefaultOpen);\n shell.setBottomMode(initial ? 'expanded' : 'collapsed');\n didInitFromDefaultOpenRef.current = true;\n }\n }, [shell.currentBreakpointReady, open, defaultOpen, resolvedDefaultOpen]);\n\n // Dev guards\n const wasControlledRef = React.useRef<boolean | null>(null);\n if (process.env.NODE_ENV !== 'production') {\n if (typeof open !== 'undefined' && typeof defaultOpen !== 'undefined') {\n // eslint-disable-next-line no-console\n console.error('Shell.Bottom: Do not pass both `open` and `defaultOpen`. Choose one.');\n }\n if (typeof (props as any).size !== 'undefined' && typeof (props as any).defaultSize !== 'undefined') {\n // eslint-disable-next-line no-console\n console.error('Shell.Bottom: Do not pass both `size` and `defaultSize`. Choose one.');\n }\n }\n\n React.useEffect(() => {\n const isControlled = typeof open !== 'undefined';\n if (wasControlledRef.current === null) {\n wasControlledRef.current = isControlled;\n return;\n }\n if (wasControlledRef.current !== isControlled) {\n // eslint-disable-next-line no-console\n console.warn('Shell.Bottom: Switching between controlled and uncontrolled `open` is not supported.');\n wasControlledRef.current = isControlled;\n }\n }, [open]);\n\n // Controlled sync (responsive handled below)\n React.useEffect(() => {\n if (typeof open === 'undefined') return;\n shell.setBottomMode(open ? 'expanded' : 'collapsed');\n }, [open]);\n\n const responsiveNotifiedRef = React.useRef(false);\n\n // Controlled responsive open\n const resolvedOpen = useResponsiveValue(open);\n React.useEffect(() => {\n if (typeof resolvedOpen === 'undefined') return;\n const shouldExpand = Boolean(resolvedOpen);\n shell.setBottomMode(shouldExpand ? 'expanded' : 'collapsed');\n }, [resolvedOpen]);\n\n const initNotifiedRef = React.useRef(false);\n const lastBottomModeRef = React.useRef<PaneMode | null>(null);\n React.useEffect(() => {\n if (!initNotifiedRef.current && typeof open === 'undefined' && defaultOpen && shell.bottomMode === 'expanded') {\n onOpenChange?.(true, { reason: 'init' });\n initNotifiedRef.current = true;\n }\n if (typeof open === 'undefined') {\n if (lastBottomModeRef.current !== null && lastBottomModeRef.current !== shell.bottomMode) {\n if (!responsiveNotifiedRef.current) {\n onOpenChange?.(shell.bottomMode === 'expanded', { reason: 'toggle' });\n }\n responsiveNotifiedRef.current = false;\n }\n lastBottomModeRef.current = shell.bottomMode;\n }\n }, [shell.bottomMode, open, defaultOpen, onOpenChange]);\n\n React.useEffect(() => {\n if (shell.bottomMode === 'expanded') {\n onExpand?.();\n } else {\n onCollapse?.();\n }\n }, [shell.bottomMode, onExpand, onCollapse]);\n\n const isExpanded = shell.bottomMode === 'expanded';\n\n const persistenceAdapter = React.useMemo(() => {\n if (!paneId || persistence) return persistence;\n const key = `kookie-ui:shell:bottom:${paneId}`;\n const adapter: PaneSizePersistence = {\n load: () => {\n if (typeof window === 'undefined') return undefined;\n const v = window.localStorage.getItem(key);\n return v ? Number(v) : undefined;\n },\n save: (size: number) => {\n if (typeof window === 'undefined') return;\n window.localStorage.setItem(key, String(size));\n },\n };\n return adapter;\n }, [paneId, persistence]);\n\n React.useEffect(() => {\n let mounted = true;\n (async () => {\n if (!resizable || !persistenceAdapter?.load || isOverlay) return;\n const loaded = await persistenceAdapter.load();\n if (mounted && typeof loaded === 'number' && localRef.current) {\n localRef.current.style.setProperty('--bottom-size', `${loaded}px`);\n onResize?.(loaded);\n }\n })();\n return () => {\n mounted = false;\n };\n }, [resizable, persistenceAdapter, onResize, isOverlay]);\n\n const handleEl =\n resizable && !isOverlay && isExpanded ? (\n <PaneResizeContext.Provider\n value={{\n containerRef: localRef,\n cssVarName: '--bottom-size',\n minSize,\n maxSize,\n defaultSize: expandedSize,\n orientation: 'horizontal',\n edge: 'start',\n computeNext: (client, startClient, startSize) => {\n const delta = client - startClient;\n return startSize - delta;\n },\n onResize,\n onResizeStart,\n onResizeEnd: (size) => {\n onResizeEnd?.(size);\n emitSizeChange(size, { reason: 'resize' });\n persistenceAdapter?.save?.(size);\n },\n target: 'bottom',\n collapsible,\n snapPoints,\n snapTolerance: snapTolerance ?? 8,\n collapseThreshold,\n requestCollapse: () => shell.setBottomMode('collapsed'),\n requestToggle: () => shell.togglePane('bottom'),\n }}\n >\n {handleChildren.length > 0 ? handleChildren.map((el, i) => React.cloneElement(el, { key: el.key ?? i })) : <PaneHandle />}\n </PaneResizeContext.Provider>\n ) : null;\n\n // Strip control/size props from DOM spread (moved above overlay return to keep hook order consistent)\n const {\n defaultOpen: _bottomDefaultOpenIgnored,\n open: _bottomOpenIgnored,\n onOpenChange: _bottomOnOpenChangeIgnored,\n size: _bottomSizeIgnored,\n defaultSize: _bottomDefaultSizeIgnored,\n onSizeChange: _bottomOnSizeChangeIgnored,\n sizeUpdate: _szu,\n sizeUpdateMs: _szums,\n ...bottomDomProps\n } = props as any;\n\n // Normalize CSS lengths to px (moved above overlay return to keep hook order consistent)\n const normalizeToPx = React.useCallback((value: number | string | undefined): number | undefined => {\n if (value == null) return undefined;\n if (typeof value === 'number' && Number.isFinite(value)) return value;\n const str = String(value).trim();\n if (!str) return undefined;\n if (str.endsWith('px')) return Number.parseFloat(str);\n if (str.endsWith('rem')) {\n const rem = Number.parseFloat(getComputedStyle(document.documentElement).fontSize || '16') || 16;\n return Number.parseFloat(str) * rem;\n }\n if (str.endsWith('%')) {\n const pct = Number.parseFloat(str);\n const base = document.documentElement.clientHeight || window.innerHeight || 0;\n return (pct / 100) * base;\n }\n const n = Number.parseFloat(str);\n return Number.isFinite(n) ? n : undefined;\n }, []);\n\n // Apply defaultSize on mount when uncontrolled (moved above overlay return)\n React.useEffect(() => {\n if (!localRef.current) return;\n if (typeof (props as any).size === 'undefined' && typeof (props as any).defaultSize !== 'undefined') {\n const px = normalizeToPx((props as any).defaultSize);\n if (typeof px === 'number' && Number.isFinite(px)) {\n const minPx = typeof minSize === 'number' ? minSize : undefined;\n const maxPx = typeof maxSize === 'number' ? maxSize : undefined;\n const clamped = Math.min(maxPx ?? px, Math.max(minPx ?? px, px));\n localRef.current.style.setProperty('--bottom-size', `${clamped}px`);\n emitSizeChange(clamped, { reason: 'init' });\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n // Controlled size sync (moved above overlay return)\n React.useEffect(() => {\n if (!localRef.current) return;\n if (typeof (props as any).size === 'undefined') return;\n const px = normalizeToPx((props as any).size);\n if (typeof px === 'number' && Number.isFinite(px)) {\n const minPx = typeof minSize === 'number' ? minSize : undefined;\n const maxPx = typeof maxSize === 'number' ? maxSize : undefined;\n const clamped = Math.min(maxPx ?? px, Math.max(minPx ?? px, px));\n localRef.current.style.setProperty('--bottom-size', `${clamped}px`);\n emitSizeChange(clamped, { reason: 'controlled' });\n }\n }, [(props as any).size, minSize, maxSize, normalizeToPx, emitSizeChange]);\n\n if (isOverlay) {\n const open = shell.bottomMode === 'expanded';\n return (\n <Sheet.Root open={open} onOpenChange={(o) => shell.setBottomMode(o ? 'expanded' : 'collapsed')}>\n <Sheet.Content side=\"bottom\" style={{ padding: 0 }} height={{ initial: `${expandedSize}px` }}>\n <VisuallyHidden>\n <Sheet.Title>Bottom panel</Sheet.Title>\n </VisuallyHidden>\n {contentChildren}\n </Sheet.Content>\n </Sheet.Root>\n );\n }\n\n return (\n <div\n {...bottomDomProps}\n ref={setRef}\n className={classNames('rt-ShellBottom', className)}\n data-mode={shell.bottomMode}\n data-peek={shell.peekTarget === 'bottom' || undefined}\n data-presentation={shell.currentBreakpointReady ? resolvedPresentation : undefined}\n data-open={(shell.currentBreakpointReady && isStacked && isExpanded) || undefined}\n style={{\n ...style,\n ['--bottom-size' as any]: `${expandedSize}px`,\n ['--bottom-min-size' as any]: `${minSize}px`,\n ['--bottom-max-size' as any]: `${maxSize}px`,\n }}\n >\n <div className=\"rt-ShellBottomContent\" data-visible={isExpanded || undefined}>\n {contentChildren}\n </div>\n {handleEl}\n </div>\n );\n },\n) as BottomComponent;\nBottom.displayName = 'Shell.Bottom';\nBottom.Handle = BottomHandle;\n"],
5
+ "mappings": "AAAA,UAAYA,MAAW,QACvB,OAAOC,OAAgB,aACvB,UAAYC,MAAW,cACvB,OAAS,kBAAAC,OAAsB,wBAC/B,OAAS,YAAAC,OAAgB,sBACzB,OAAS,6BAAAC,GAA2B,sBAAAC,MAA0B,oBAC9D,OAAS,qBAAAC,OAAyB,oBAClC,OAAS,gBAAAC,EAAc,cAAAC,OAAkB,qBACzC,MAA4B,oBAwCrB,MAAMC,EAASV,EAAM,WAC1B,CACE,CACE,UAAAW,EACA,aAAAC,EAAe,QAGf,YAAAC,EACA,KAAAC,EACA,aAAAC,EACA,aAAAC,EAAe,IACf,QAAAC,EAAU,IACV,QAAAC,EAAU,IACV,UAAAC,EAAY,GACZ,YAAAC,EAAc,GACd,SAAAC,EACA,WAAAC,EACA,SAAAC,EACA,cAAAC,EACA,YAAAC,EACA,WAAAC,EACA,cAAAC,EACA,kBAAAC,EACA,OAAAC,EACA,YAAAC,EACA,SAAAC,EACA,MAAAC,EACA,GAAGC,CACL,EACAC,IACG,CACH,MAAM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,CAAc,CAAC,EAErET,EAAW,CACb,MAAMvB,EAAOqB,EAAM,aAAe,WAClC,OACEnC,EAAA,cAACE,EAAM,KAAN,CAAW,KAAMY,EAAM,aAAemF,GAAM9D,EAAM,cAAc8D,EAAI,WAAa,WAAW,GAC3FjG,EAAA,cAACE,EAAM,QAAN,CAAc,KAAK,SAAS,MAAO,CAAE,QAAS,CAAE,EAAG,OAAQ,CAAE,QAAS,GAAGc,CAAY,IAAK,GACzFhB,EAAA,cAACG,GAAA,KACCH,EAAA,cAACE,EAAM,MAAN,KAAY,cAAY,CAC3B,EACC2C,CACH,CACF,CAEJ,CAEA,OACE7C,EAAA,cAAC,OACE,GAAGuF,GACJ,IAAK/C,GACL,UAAWvC,GAAW,iBAAkBU,CAAS,EACjD,YAAWwB,EAAM,WACjB,YAAWA,EAAM,aAAe,UAAY,OAC5C,oBAAmBA,EAAM,uBAAyBC,EAAuB,OACzE,YAAYD,EAAM,wBAA0BG,IAAa4B,GAAe,OACxE,MAAO,CACL,GAAGlC,EACF,gBAAyB,GAAGhB,CAAY,KACxC,oBAA6B,GAAGC,CAAO,KACvC,oBAA6B,GAAGC,CAAO,IAC1C,GAEAlB,EAAA,cAAC,OAAI,UAAU,wBAAwB,eAAckE,GAAc,QAChErB,CACH,EACC4B,EACH,CAEJ,CACF,EACA/D,EAAO,YAAc,eACrBA,EAAO,OAASF",
6
+ "names": ["React", "classNames", "Sheet", "VisuallyHidden", "useShell", "useResponsivePresentation", "useResponsiveValue", "PaneResizeContext", "BottomHandle", "PaneHandle", "Bottom", "className", "presentation", "defaultOpen", "open", "onOpenChange", "expandedSize", "minSize", "maxSize", "resizable", "collapsible", "onExpand", "onCollapse", "onResize", "onResizeStart", "onResizeEnd", "snapPoints", "snapTolerance", "collapseThreshold", "paneId", "persistence", "children", "style", "props", "ref", "shell", "resolvedPresentation", "isOverlay", "isStacked", "localRef", "setRef", "node", "childArray", "handleChildren", "el", "contentChildren", "emitSizeChange", "cb", "strategy", "ms", "t", "s", "meta", "last", "now", "didInitRef", "didInitFromDefaultOpenRef", "resolvedDefaultOpen", "initial", "wasControlledRef", "isControlled", "responsiveNotifiedRef", "resolvedOpen", "shouldExpand", "initNotifiedRef", "lastBottomModeRef", "isExpanded", "persistenceAdapter", "key", "v", "size", "mounted", "loaded", "handleEl", "client", "startClient", "startSize", "delta", "i", "_bottomDefaultOpenIgnored", "_bottomOpenIgnored", "_bottomOnOpenChangeIgnored", "_bottomSizeIgnored", "_bottomDefaultSizeIgnored", "_bottomOnSizeChangeIgnored", "_szu", "_szums", "bottomDomProps", "normalizeToPx", "value", "str", "rem", "pct", "base", "n", "px", "clamped", "o"]
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"shell-handles.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/shell-handles.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,eAAO,MAAM,UAAU,mKA+KrB,CAAC;AAGH,eAAO,MAAM,WAAW,mKAA+H,CAAC;AAGxJ,eAAO,MAAM,aAAa,mKAA+H,CAAC;AAG1J,eAAO,MAAM,eAAe,mKAA+H,CAAC;AAG5J,eAAO,MAAM,YAAY,mKAA+H,CAAC"}
1
+ {"version":3,"file":"shell-handles.d.ts","sourceRoot":"","sources":["../../../../src/components/_internal/shell-handles.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,eAAO,MAAM,UAAU,mKAwMrB,CAAC;AAGH,eAAO,MAAM,WAAW,mKAA+H,CAAC;AAGxJ,eAAO,MAAM,aAAa,mKAA+H,CAAC;AAG1J,eAAO,MAAM,eAAe,mKAA+H,CAAC;AAG5J,eAAO,MAAM,YAAY,mKAA+H,CAAC"}
@@ -1,2 +1,2 @@
1
- import*as s from"react";import B from"classnames";import{usePaneResize as X}from"./shell-resize.js";const E=s.forwardRef(({className:i,children:l,...N},$)=>{const{containerRef:g,cssVarName:c,minSize:P,maxSize:b,defaultSize:x,orientation:p,edge:M,computeNext:I,onResize:w,onResizeStart:H,onResizeEnd:h,snapPoints:L,snapTolerance:W,collapseThreshold:T,collapsible:C,target:J,requestCollapse:K,requestToggle:V}=X(),S=s.useRef(null);s.useEffect(()=>()=>{try{S.current?.()}catch{}S.current=null},[]);const F=p;return s.createElement("div",{...N,ref:$,className:B("rt-ShellResizer",i),"data-orientation":p,"data-edge":M,role:"slider","aria-orientation":F,"aria-valuemin":P,"aria-valuemax":b,"aria-valuenow":x,tabIndex:0,onPointerDown:e=>{if(!g.current)return;e.preventDefault();const r=g.current,a=e.currentTarget,d=e.pointerId;try{S.current?.()}catch{}r.setAttribute("data-resizing","");try{a.setPointerCapture(d)}catch{}const y=p==="vertical"?e.clientX:e.clientY,n=parseFloat(getComputedStyle(r).getPropertyValue(c)||`${x}`),t=o=>Math.min(Math.max(o,P),b),m=document.body,U=m.style.cursor,q=m.style.userSelect;m.style.cursor=p==="vertical"?"col-resize":"row-resize",m.style.userSelect="none",H?.(n);const z=o=>{const u=p==="vertical"?o.clientX:o.clientY,f=t(I(u,y,n));r.style.setProperty(c,`${f}px`),a.setAttribute("aria-valuenow",String(f)),w?.(f)},R=()=>{try{a.releasePointerCapture(d)}catch{}window.removeEventListener("pointermove",z),window.removeEventListener("pointerup",v),window.removeEventListener("pointercancel",v),window.removeEventListener("keydown",D),a.removeEventListener("lostpointercapture",v),r.removeAttribute("data-resizing"),m.style.cursor=U,m.style.userSelect=q,S.current=null},v=()=>{const o=parseFloat(getComputedStyle(r).getPropertyValue(c)||`${x}`);let u=o;if(L&&L.length){const f=L.reduce((A,k)=>Math.abs(k-o)<Math.abs(A-o)?k:A,L[0]);Math.abs(f-o)<=(W??8)&&(u=f,r.style.setProperty(c,`${u}px`),a.setAttribute("aria-valuenow",String(u)),w?.(u))}C&&typeof T=="number"&&o<=T&&K?.(),h?.(u),R()},D=o=>{o.key==="Escape"&&(r.style.setProperty(c,`${n}px`),a.setAttribute("aria-valuenow",String(n)),h?.(n),R())};window.addEventListener("pointermove",z),window.addEventListener("pointerup",v),window.addEventListener("pointercancel",v),window.addEventListener("keydown",D),a.addEventListener("lostpointercapture",v),S.current=R},onDoubleClick:()=>{C&&V?.()},onKeyDown:e=>{if(!g.current)return;const r=g.current,a=parseFloat(getComputedStyle(r).getPropertyValue(c)||`${x}`),d=t=>Math.min(Math.max(t,P),b),y=e.shiftKey?32:8;let n=0;if(p==="vertical"?e.key==="ArrowRight"?n=y:e.key==="ArrowLeft"&&(n=-y):e.key==="ArrowDown"?n=y:e.key==="ArrowUp"&&(n=-y),e.key==="Home"){e.preventDefault(),H?.(a);const t=d(P);r.style.setProperty(c,`${t}px`),e.currentTarget.setAttribute("aria-valuenow",String(t)),w?.(t),h?.(t);return}if(e.key==="End"){e.preventDefault(),H?.(a);const t=d(b);r.style.setProperty(c,`${t}px`),e.currentTarget.setAttribute("aria-valuenow",String(t)),w?.(t),h?.(t);return}if(n!==0){e.preventDefault(),H?.(a);const t=d(a+(M==="start"&&p==="vertical"?-n:n));r.style.setProperty(c,`${t}px`),e.currentTarget.setAttribute("aria-valuenow",String(t)),w?.(t),h?.(t)}}},l)});E.displayName="Shell.Handle";const Y=s.forwardRef((i,l)=>s.createElement(E,{...i,ref:l}));Y.displayName="Shell.Panel.Handle";const O=s.forwardRef((i,l)=>s.createElement(E,{...i,ref:l}));O.displayName="Shell.Sidebar.Handle";const j=s.forwardRef((i,l)=>s.createElement(E,{...i,ref:l}));j.displayName="Shell.Inspector.Handle";const G=s.forwardRef((i,l)=>s.createElement(E,{...i,ref:l}));G.displayName="Shell.Bottom.Handle";export{G as BottomHandle,j as InspectorHandle,E as PaneHandle,Y as PanelHandle,O as SidebarHandle};
1
+ import*as i from"react";import B from"classnames";import{usePaneResize as X}from"./shell-resize.js";const P=i.forwardRef(({className:c,children:d,...I},W)=>{const{containerRef:R,cssVarName:u,minSize:x,maxSize:H,defaultSize:C,orientation:y,edge:T,computeNext:F,onResize:h,onResizeStart:M,onResizeEnd:S,snapPoints:D,snapTolerance:K,collapseThreshold:z,collapsible:A,target:J,requestCollapse:V,requestToggle:U}=X(),g=i.useRef(null);i.useEffect(()=>()=>{try{g.current?.()}catch{}g.current=null},[]);const q=y;return i.createElement("div",{...I,ref:W,className:B("rt-ShellResizer",c),"data-orientation":y,"data-edge":T,role:"slider","aria-orientation":q,"aria-valuemin":x,"aria-valuemax":H,"aria-valuenow":C,tabIndex:0,onPointerDown:e=>{if(!R.current)return;e.preventDefault();const n=R.current,l=e.currentTarget,b=e.pointerId;try{g.current?.()}catch{}n.setAttribute("data-resizing","");try{l.setPointerCapture(b)}catch{}const w=y==="vertical"?e.clientX:e.clientY,p=parseFloat(getComputedStyle(n).getPropertyValue(u)||`${C}`),m=s=>Math.min(Math.max(s,x),H),r=document.body,t=r.style.cursor,v=r.style.userSelect;r.style.cursor=y==="vertical"?"col-resize":"row-resize",r.style.userSelect="none",M?.(p);const a=s=>{const f=y==="vertical"?s.clientX:s.clientY,L=m(F(f,w,p));n.style.setProperty(u,`${L}px`),l.setAttribute("aria-valuenow",String(L)),h?.(L)},E=()=>{try{l.releasePointerCapture(b)}catch{}window.removeEventListener("pointermove",a),document.removeEventListener("pointermove",a),window.removeEventListener("mousemove",a),document.removeEventListener("mousemove",a),l.removeEventListener("pointermove",a),window.removeEventListener("pointerup",o),document.removeEventListener("pointerup",o),window.removeEventListener("mouseup",o),document.removeEventListener("mouseup",o),window.removeEventListener("pointercancel",o),document.removeEventListener("pointercancel",o),window.removeEventListener("keydown",N),l.removeEventListener("lostpointercapture",o),n.removeAttribute("data-resizing"),r.style.cursor=t,r.style.userSelect=v,g.current=null},o=()=>{const s=parseFloat(getComputedStyle(n).getPropertyValue(u)||`${C}`);let f=s;if(D&&D.length){const L=D.reduce((k,$)=>Math.abs($-s)<Math.abs(k-s)?$:k,D[0]);Math.abs(L-s)<=(K??8)&&(f=L,n.style.setProperty(u,`${f}px`),l.setAttribute("aria-valuenow",String(f)),h?.(f))}A&&typeof z=="number"&&s<=z&&V?.(),S?.(f),E()},N=s=>{s.key==="Escape"&&(n.style.setProperty(u,`${p}px`),l.setAttribute("aria-valuenow",String(p)),S?.(p),E())};window.addEventListener("pointermove",a),document.addEventListener("pointermove",a),window.addEventListener("mousemove",a),document.addEventListener("mousemove",a),l.addEventListener("pointermove",a),window.addEventListener("pointerup",o),document.addEventListener("pointerup",o),window.addEventListener("mouseup",o),document.addEventListener("mouseup",o),window.addEventListener("pointercancel",o),document.addEventListener("pointercancel",o),window.addEventListener("keydown",N),l.addEventListener("lostpointercapture",o),g.current=E},onDoubleClick:()=>{A&&U?.()},onKeyDown:e=>{if(!R.current)return;const n=R.current,l=getComputedStyle(n).getPropertyValue(u),b=Number.parseFloat(l.trim()),w=Number.isFinite(b)?b:C,p=t=>Math.min(Math.max(t,x),H),m=e.shiftKey?32:8;let r=0;if(y==="vertical"){const t=typeof document<"u"?document.dir:void 0,v=getComputedStyle(n).direction,a=!!(n.closest&&n.closest('[dir="rtl"]')),E=t==="rtl"||v==="rtl"||a;e.key==="ArrowRight"?r=E?-m:m:e.key==="ArrowLeft"&&(r=E?m:-m)}else e.key==="ArrowDown"?r=m:e.key==="ArrowUp"&&(r=-m);if(e.key==="Home"){e.preventDefault(),M?.(w);const t=p(x);n.style.setProperty(u,`${t}px`),e.currentTarget.setAttribute("aria-valuenow",String(t)),h?.(t),S?.(t);return}if(e.key==="End"){e.preventDefault(),M?.(w);const t=p(H);n.style.setProperty(u,`${t}px`),e.currentTarget.setAttribute("aria-valuenow",String(t)),h?.(t),S?.(t);return}if(r!==0){e.preventDefault(),M?.(w);const t=y==="vertical"&&T==="start"?-r:r,v=p(w+t);n.style.setProperty(u,`${v}px`),e.currentTarget.setAttribute("aria-valuenow",String(v)),h?.(v),S?.(v)}}},d)});P.displayName="Shell.Handle";const Y=i.forwardRef((c,d)=>i.createElement(P,{...c,ref:d}));Y.displayName="Shell.Panel.Handle";const O=i.forwardRef((c,d)=>i.createElement(P,{...c,ref:d}));O.displayName="Shell.Sidebar.Handle";const j=i.forwardRef((c,d)=>i.createElement(P,{...c,ref:d}));j.displayName="Shell.Inspector.Handle";const G=i.forwardRef((c,d)=>i.createElement(P,{...c,ref:d}));G.displayName="Shell.Bottom.Handle";export{G as BottomHandle,j as InspectorHandle,P as PaneHandle,Y as PanelHandle,O as SidebarHandle};
2
2
  //# sourceMappingURL=shell-handles.js.map