@kushagradhawan/kookie-ui 0.1.42 → 0.1.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/components.css CHANGED
@@ -13990,7 +13990,7 @@
13990
13990
  flex: 1;
13991
13991
  display: flex;
13992
13992
  flex-direction: column;
13993
- padding: var(--base-menu-content-padding);
13993
+ padding-bottom: var(--base-menu-content-padding);
13994
13994
  box-sizing: border-box;
13995
13995
  list-style: none;
13996
13996
  margin: 0;
@@ -14143,8 +14143,8 @@
14143
14143
  padding-left: var(--space-2);
14144
14144
  }
14145
14145
  .rt-SidebarContent :where(.rt-BaseMenuItem) {
14146
- margin-top: calc(var(--space-1) / 2);
14147
- margin-bottom: calc(var(--space-1) / 2);
14146
+ margin-top: calc(var(--space-1) / 4);
14147
+ margin-bottom: calc(var(--space-1) / 4);
14148
14148
  }
14149
14149
  :where(.rt-SidebarContainer.rt-layout-rail .rt-SidebarContent),
14150
14150
  .rt-ShellSidebarRail :where(.rt-SidebarContent),
@@ -14209,13 +14209,13 @@
14209
14209
  --backdrop-filter-panel: blur(var(--backdrop-blur-panel));
14210
14210
  --backdrop-filter-components: blur(var(--backdrop-blur-components));
14211
14211
  }
14212
- :where(.rt-SidebarRoot[data-type="floating"]) .rt-SidebarContainer:where(.rt-variant-outline) {
14212
+ :where(.rt-SidebarRoot[data-type='floating']) .rt-SidebarContainer:where(.rt-variant-outline) {
14213
14213
  box-shadow: inset 0 0 0 1px var(--gray-a6);
14214
14214
  }
14215
- :where(.rt-SidebarRoot[data-type="sidebar"][data-side="left"]) .rt-SidebarContainer:where(.rt-variant-outline) {
14215
+ :where(.rt-SidebarRoot[data-type='sidebar'][data-side='left']) .rt-SidebarContainer:where(.rt-variant-outline) {
14216
14216
  box-shadow: inset -1px 0 0 0 var(--gray-a6);
14217
14217
  }
14218
- :where(.rt-SidebarRoot[data-type="sidebar"][data-side="right"]) .rt-SidebarContainer:where(.rt-variant-outline) {
14218
+ :where(.rt-SidebarRoot[data-type='sidebar'][data-side='right']) .rt-SidebarContainer:where(.rt-variant-outline) {
14219
14219
  box-shadow: inset 1px 0 0 0 var(--gray-a6);
14220
14220
  }
14221
14221
  .rt-SidebarContainer:where(.rt-variant-ghost) {
@@ -14267,22 +14267,22 @@
14267
14267
  --backdrop-filter-panel: blur(var(--backdrop-blur-panel));
14268
14268
  --backdrop-filter-components: blur(var(--backdrop-blur-components));
14269
14269
  }
14270
- :where(.rt-SidebarRoot[data-type="floating"]) .rt-SidebarContainer:where(.rt-variant-surface) {
14270
+ :where(.rt-SidebarRoot[data-type='floating']) .rt-SidebarContainer:where(.rt-variant-surface) {
14271
14271
  box-shadow: inset 0 0 0 1px var(--gray-6);
14272
14272
  }
14273
- :where([data-panel-background='translucent']) :is(:where(.rt-SidebarRoot[data-type="floating"]) .rt-SidebarContainer:where(.rt-variant-surface)) {
14273
+ :where([data-panel-background='translucent']) :is(:where(.rt-SidebarRoot[data-type='floating']) .rt-SidebarContainer:where(.rt-variant-surface)) {
14274
14274
  box-shadow: inset 0 0 0 1px var(--gray-a6);
14275
14275
  }
14276
- :where(.rt-SidebarRoot[data-type="sidebar"][data-side="left"]) .rt-SidebarContainer:where(.rt-variant-surface) {
14276
+ :where(.rt-SidebarRoot[data-type='sidebar'][data-side='left']) .rt-SidebarContainer:where(.rt-variant-surface) {
14277
14277
  box-shadow: inset -1px 0 0 0 var(--gray-6);
14278
14278
  }
14279
- :where([data-panel-background='translucent']) :is(:where(.rt-SidebarRoot[data-type="sidebar"][data-side="left"]) .rt-SidebarContainer:where(.rt-variant-surface)) {
14279
+ :where([data-panel-background='translucent']) :is(:where(.rt-SidebarRoot[data-type='sidebar'][data-side='left']) .rt-SidebarContainer:where(.rt-variant-surface)) {
14280
14280
  box-shadow: inset -1px 0 0 0 var(--gray-a6);
14281
14281
  }
14282
- :where(.rt-SidebarRoot[data-type="sidebar"][data-side="right"]) .rt-SidebarContainer:where(.rt-variant-surface) {
14282
+ :where(.rt-SidebarRoot[data-type='sidebar'][data-side='right']) .rt-SidebarContainer:where(.rt-variant-surface) {
14283
14283
  box-shadow: inset 1px 0 0 0 var(--gray-6);
14284
14284
  }
14285
- :where([data-panel-background='translucent']) :is(:where(.rt-SidebarRoot[data-type="sidebar"][data-side="right"]) .rt-SidebarContainer:where(.rt-variant-surface)) {
14285
+ :where([data-panel-background='translucent']) :is(:where(.rt-SidebarRoot[data-type='sidebar'][data-side='right']) .rt-SidebarContainer:where(.rt-variant-surface)) {
14286
14286
  box-shadow: inset 1px 0 0 0 var(--gray-a6);
14287
14287
  }
14288
14288
  .rt-SidebarHeader:where(.rt-SidebarHeader--container) {
@@ -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})},$=(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 F=(r,t,o)=>(o=r!=null?X(ee(r)):{},$(t||!r||!r.__esModule?P(o,"default",{value:r,enumerable:!0}):o,r)),oe=r=>$(P({},"__esModule",{value:!0}),r);var ae={};te(ae,{Content:()=>L,Footer:()=>x,Group:()=>W,GroupContent:()=>k,GroupLabel:()=>A,Header:()=>R,Menu:()=>z,MenuButton:()=>G,MenuItem:()=>w,MenuSub:()=>I,MenuSubContent:()=>D,MenuSubTrigger:()=>V,Root:()=>H,Separator:()=>E});module.exports=oe(ae);var e=F(require("react")),i=F(require("classnames")),T=require("./slot.js"),c=require("radix-ui"),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"),B=require("./badge.js");const j=e.createContext(null);function M(){return e.useContext(j)}const H=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,...g}=(0,U.extractProps)(r,f.sidebarPropDefs),{asChild:Q,panelBackground:v,...N}=g,b=l||o.accentColor,S=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}`,S&&`rt-layout-${S}`),"data-accent-color":b,"data-high-contrast":p||void 0,"data-panel-background":m,"data-layout":S},y)))});H.displayName="Sidebar.Root";const L=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)},t))});L.displayName="Sidebar.Content";const R=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)})});R.displayName="Sidebar.Header";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-SidebarFooter",`rt-r-size-${d}`,`rt-menu-variant-${u}`,{"rt-SidebarFooter--container":t},r)})});x.displayName="Sidebar.Footer";const E=e.forwardRef(({className:r,...t},o)=>e.createElement(_.Separator,{...t,ref:o,className:(0,i.default)("rt-SidebarSeparator",r)}));E.displayName="Sidebar.Separator";const z=e.forwardRef(({className:r,...t},o)=>e.createElement("ul",{...t,ref:o,role:"menu",className:(0,i.default)("rt-BaseMenuViewport","rt-SidebarMenu",r)}));z.displayName="Sidebar.Menu";const w=e.forwardRef(({className:r,...t},o)=>e.createElement("li",{...t,ref:o,className:(0,i.default)("rt-SidebarMenuItem",r)}));w.displayName="Sidebar.MenuItem";const G=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,g]=e.useState(!1),v=M()?.size??"2",N=r?T.Slot:"button",{onClick:b}=p,S=e.useCallback(s=>{switch(s.key){case"Enter":case" ":s.preventDefault(),b&&b(s);break;case"ArrowDown":{s.preventDefault();const C=s.currentTarget.nextElementSibling?.querySelector('[role="menuitem"]');C&&C.focus();break}case"ArrowUp":{s.preventDefault();const C=s.currentTarget.previousElementSibling?.querySelector('[role="menuitem"]');C&&C.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:S,onMouseEnter:s=>{g(!0),u?.(s)},onMouseLeave:s=>{g(!1),m?.(s)}},r?d:e.createElement(e.Fragment,null,d,a&&e.createElement("div",{className:"rt-SidebarMenuBadge"},typeof a=="string"?e.createElement(B.Badge,{size:v,variant:"soft"},a):e.createElement(B.Badge,{size:a.size||v,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:v},o))))});G.displayName="Sidebar.MenuButton";const I=e.forwardRef(({defaultOpen:r=!1,children:t,...o},a)=>e.createElement("div",{...o,ref:a},e.createElement(c.Accordion.Root,{type:"single",collapsible:!0,defaultValue:r?"item":void 0},e.createElement(c.Accordion.Item,{value:"item"},t))));I.displayName="Sidebar.MenuSub";const V=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.Accordion.Header,{asChild:!0},e.createElement("div",null,e.createElement(c.Accordion.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")})))))});V.displayName="Sidebar.MenuSubTrigger";const D=e.forwardRef(({className:r,children:t,...o},a)=>e.createElement(c.Accordion.Content,{...o,ref:a,className:(0,i.default)("rt-SidebarMenuSubContent",r)},e.createElement("div",{className:"rt-SidebarMenuSubList"},t)));D.displayName="Sidebar.MenuSubContent";const W=e.forwardRef(({className:r,...t},o)=>e.createElement("div",{...t,ref:o,className:(0,i.default)("rt-BaseMenuGroup","rt-SidebarGroup",r)}));W.displayName="Sidebar.Group";const A=e.forwardRef(({asChild:r=!1,className:t,...o},a)=>e.createElement(r?T.Slot:"div",{...o,ref:a,role:"group",className:(0,i.default)("rt-BaseMenuLabel","rt-SidebarGroupLabel",t)}));A.displayName="Sidebar.GroupLabel";const k=e.forwardRef(({className:r,...t},o)=>e.createElement("div",{...t,ref:o,className:(0,i.default)("rt-SidebarGroupContent",r)}));k.displayName="Sidebar.GroupContent";
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})},$=(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 F=(r,t,o)=>(o=r!=null?X(ee(r)):{},$(t||!r||!r.__esModule?P(o,"default",{value:r,enumerable:!0}):o,r)),oe=r=>$(P({},"__esModule",{value:!0}),r);var ae={};te(ae,{Content:()=>L,Footer:()=>x,Group:()=>W,GroupContent:()=>k,GroupLabel:()=>A,Header:()=>R,Menu:()=>z,MenuButton:()=>G,MenuItem:()=>w,MenuSub:()=>I,MenuSubContent:()=>D,MenuSubTrigger:()=>V,Root:()=>H,Separator:()=>E});module.exports=oe(ae);var e=F(require("react")),i=F(require("classnames")),T=require("./slot.js"),c=require("radix-ui"),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"),B=require("./badge.js");const j=e.createContext(null);function M(){return e.useContext(j)}const H=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,S=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}`,S&&`rt-layout-${S}`),"data-accent-color":b,"data-high-contrast":p||void 0,"data-panel-background":m,"data-layout":S},y)))});H.displayName="Sidebar.Root";const L=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)))});L.displayName="Sidebar.Content";const R=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)})});R.displayName="Sidebar.Header";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-SidebarFooter",`rt-r-size-${d}`,`rt-menu-variant-${u}`,{"rt-SidebarFooter--container":t},r)})});x.displayName="Sidebar.Footer";const E=e.forwardRef(({className:r,...t},o)=>e.createElement(_.Separator,{...t,ref:o,className:(0,i.default)("rt-SidebarSeparator",r)}));E.displayName="Sidebar.Separator";const z=e.forwardRef(({className:r,...t},o)=>e.createElement("ul",{...t,ref:o,role:"menu",className:(0,i.default)("rt-SidebarMenu",r)}));z.displayName="Sidebar.Menu";const w=e.forwardRef(({className:r,...t},o)=>e.createElement("li",{...t,ref:o,className:(0,i.default)("rt-SidebarMenuItem",r)}));w.displayName="Sidebar.MenuItem";const G=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?T.Slot:"button",{onClick:b}=p,S=e.useCallback(s=>{switch(s.key){case"Enter":case" ":s.preventDefault(),b&&b(s);break;case"ArrowDown":{s.preventDefault();const C=s.currentTarget.nextElementSibling?.querySelector('[role="menuitem"]');C&&C.focus();break}case"ArrowUp":{s.preventDefault();const C=s.currentTarget.previousElementSibling?.querySelector('[role="menuitem"]');C&&C.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:S,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(B.Badge,{size:g,variant:"soft"},a):e.createElement(B.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))))});G.displayName="Sidebar.MenuButton";const I=e.forwardRef(({defaultOpen:r=!1,children:t,...o},a)=>e.createElement("div",{...o,ref:a},e.createElement(c.Accordion.Root,{type:"single",collapsible:!0,defaultValue:r?"item":void 0},e.createElement(c.Accordion.Item,{value:"item"},t))));I.displayName="Sidebar.MenuSub";const V=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.Accordion.Header,{asChild:!0},e.createElement("div",null,e.createElement(c.Accordion.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")})))))});V.displayName="Sidebar.MenuSubTrigger";const D=e.forwardRef(({className:r,children:t,...o},a)=>e.createElement(c.Accordion.Content,{...o,ref:a,className:(0,i.default)("rt-SidebarMenuSubContent",r)},e.createElement("div",{className:"rt-SidebarMenuSubList"},t)));D.displayName="Sidebar.MenuSubContent";const W=e.forwardRef(({className:r,...t},o)=>e.createElement("div",{...t,ref:o,className:(0,i.default)("rt-BaseMenuGroup","rt-SidebarGroup",r)}));W.displayName="Sidebar.Group";const A=e.forwardRef(({asChild:r=!1,className:t,...o},a)=>e.createElement(r?T.Slot:"div",{...o,ref:a,role:"group",className:(0,i.default)("rt-BaseMenuLabel","rt-SidebarGroupLabel",t)}));A.displayName="Sidebar.GroupLabel";const k=e.forwardRef(({className:r,...t},o)=>e.createElement("div",{...t,ref:o,className:(0,i.default)("rt-SidebarGroupContent",r)}));k.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 { Accordion } from 'radix-ui';\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 {children}\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-BaseMenuViewport', '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,EAA0B,oBAE1BC,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,EAA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AnC,EAAkB,YAAc,qBAIhC,MAAMD,EAAsBY,EAAM,WAChC,CAAC,CAAE,UAAAwB,EAAW,GAAGV,CAAM,EAAGC,IACxBf,EAAA,cAAC,OACE,GAAGc,EACJ,IAAKC,EACL,aAAW,EAAAkB,SAAW,yBAA0BT,CAAS,EAC3D,CAEJ,EACApC,EAAoB,YAAc",
4
+ "sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Slot } from './slot.js';\nimport { Accordion } from 'radix-ui';\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,E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AAGX,CAAM,EAAGC,IAElCf,EAAA,cAAC,YAAU,QAAV,CACE,GAAGc,EACJ,IAAKC,EACL,aAAW,EAAAkB,SAAW,2BAA4BT,CAAS,GAE3DxB,EAAA,cAAC,OAAI,UAAU,yBAAyByB,CAAS,CACnD,CAEH,EACD9B,EAAsB,YAAc,yBAKpC,MAAMR,EAAea,EAAM,WACzB,CAAC,CAAE,UAAAwB,EAAW,GAAGV,CAAM,EAAGC,IACxBf,EAAA,cAAC,OACE,GAAGc,EACJ,IAAKC,EACL,aAAW,EAAAkB,SAAW,mBAAoB,kBAAmBT,CAAS,EACxE,CAEJ,EACArC,EAAa,YAAc,gBAM3B,MAAME,EAAoBW,EAAM,WAC9B,CAAC,CAAE,QAAAuC,EAAU,GAAO,UAAAf,EAAW,GAAGV,CAAM,EAAGC,IAIvCf,EAAA,cAHWuC,EAAU,OAAO,MAG3B,CACE,GAAGzB,EACJ,IAAKC,EACL,KAAK,QACL,aAAW,EAAAkB,SAAW,mBAAoB,uBAAwBT,CAAS,EAC7E,CAGN,EACAnC,EAAkB,YAAc,qBAIhC,MAAMD,EAAsBY,EAAM,WAChC,CAAC,CAAE,UAAAwB,EAAW,GAAGV,CAAM,EAAGC,IACxBf,EAAA,cAAC,OACE,GAAGc,EACJ,IAAKC,EACL,aAAW,EAAAkB,SAAW,yBAA0BT,CAAS,EAC3D,CAEJ,EACApC,EAAoB,YAAc",
6
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", "import_radix_ui", "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"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use client";import*as e from"react";import i from"classnames";import{Slot as N}from"./slot.js";import{Accordion as C}from"radix-ui";import{sidebarPropDefs as b}from"./sidebar.props.js";import{useThemeContext as F}from"./theme.js";import{ScrollArea as j}from"./scroll-area.js";import{Separator as K}from"./separator.js";import{ThickChevronRightIcon as O}from"./icons.js";import{extractProps as _}from"../helpers/extract-props.js";import{Kbd as q}from"./kbd.js";import{Badge as T}from"./badge.js";const B=e.createContext(null);function P(){return e.useContext(B)}const H=e.forwardRef((r,o)=>{const t=F(),{size:a=b.size.default,variant:s=b.variant.default,menuVariant:d=b.menuVariant.default,layout:u=b.layout.default,panelBackground:m,color:l,highContrast:p=b.highContrast.default}=r,{className:M,children:h,...g}=_(r,b),{asChild:$,panelBackground:v,...y}=g,f=l||t.accentColor,c=u||"panel",n=typeof a=="object"?a.initial||"2":a;return e.createElement("div",{...y,ref:o,"data-accent-color":f,className:i("rt-SidebarRoot",M)},e.createElement(B.Provider,{value:{size:n,menuVariant:d}},e.createElement("div",{className:i("rt-SidebarContainer",`rt-variant-${s}`,`rt-r-size-${n}`,`rt-menu-variant-${d}`,c&&`rt-layout-${c}`),"data-accent-color":f,"data-high-contrast":p||void 0,"data-panel-background":m,"data-layout":c},h)))});H.displayName="Sidebar.Root";const L=e.forwardRef(({className:r,children:o,role:t="navigation","aria-label":a="Main navigation",id:s,...d},u)=>{const m=P(),l=m?.size??"2",p=m?.menuVariant??"soft";return e.createElement(j,{type:"hover"},e.createElement("div",{...d,ref:u,id:s,role:t,"aria-label":a,className:i("rt-BaseMenuContent","rt-SidebarContent",`rt-r-size-${l}`,`rt-menu-variant-${p}`,r)},o))});L.displayName="Sidebar.Content";const R=e.forwardRef(({className:r,asContainer:o=!0,...t},a)=>{const s=P(),d=s?.size??"2",u=s?.menuVariant??"soft";return e.createElement("div",{...t,ref:a,className:i("rt-SidebarHeader",`rt-r-size-${d}`,`rt-menu-variant-${u}`,{"rt-SidebarHeader--container":o},r)})});R.displayName="Sidebar.Header";const x=e.forwardRef(({className:r,asContainer:o=!0,...t},a)=>{const s=P(),d=s?.size??"2",u=s?.menuVariant??"soft";return e.createElement("div",{...t,ref:a,className:i("rt-SidebarFooter",`rt-r-size-${d}`,`rt-menu-variant-${u}`,{"rt-SidebarFooter--container":o},r)})});x.displayName="Sidebar.Footer";const E=e.forwardRef(({className:r,...o},t)=>e.createElement(K,{...o,ref:t,className:i("rt-SidebarSeparator",r)}));E.displayName="Sidebar.Separator";const z=e.forwardRef(({className:r,...o},t)=>e.createElement("ul",{...o,ref:t,role:"menu",className:i("rt-BaseMenuViewport","rt-SidebarMenu",r)}));z.displayName="Sidebar.Menu";const w=e.forwardRef(({className:r,...o},t)=>e.createElement("li",{...o,ref:t,className:i("rt-SidebarMenuItem",r)}));w.displayName="Sidebar.MenuItem";const G=e.forwardRef(({asChild:r=!1,isActive:o=!1,shortcut:t,badge:a,className:s,children:d,onMouseEnter:u,onMouseLeave:m,onKeyDown:l,...p},M)=>{const[h,g]=e.useState(!1),v=P()?.size??"2",y=r?N:"button",{onClick:f}=p,c=e.useCallback(n=>{switch(n.key){case"Enter":case" ":n.preventDefault(),f&&f(n);break;case"ArrowDown":{n.preventDefault();const S=n.currentTarget.nextElementSibling?.querySelector('[role="menuitem"]');S&&S.focus();break}case"ArrowUp":{n.preventDefault();const S=n.currentTarget.previousElementSibling?.querySelector('[role="menuitem"]');S&&S.focus();break}}l?.(n)},[f,l]);return e.createElement(y,{...p,ref:M,role:"menuitem","aria-current":o?"page":void 0,className:i("rt-reset","rt-BaseMenuItem","rt-SidebarMenuButton",s),"data-active":o||void 0,"data-highlighted":h||void 0,onKeyDown:c,onMouseEnter:n=>{g(!0),u?.(n)},onMouseLeave:n=>{g(!1),m?.(n)}},r?d:e.createElement(e.Fragment,null,d,a&&e.createElement("div",{className:"rt-SidebarMenuBadge"},typeof a=="string"?e.createElement(T,{size:v,variant:"soft"},a):e.createElement(T,{size:a.size||v,variant:a.variant||"soft",color:a.color,highContrast:a.highContrast,radius:a.radius},a.content)),t&&e.createElement("div",{className:"rt-BaseMenuShortcut rt-SidebarMenuShortcut"},e.createElement(q,{size:v},t))))});G.displayName="Sidebar.MenuButton";const I=e.forwardRef(({defaultOpen:r=!1,children:o,...t},a)=>e.createElement("div",{...t,ref:a},e.createElement(C.Root,{type:"single",collapsible:!0,defaultValue:r?"item":void 0},e.createElement(C.Item,{value:"item"},o))));I.displayName="Sidebar.MenuSub";const V=e.forwardRef(({asChild:r=!1,className:o,children:t,onMouseEnter:a,onMouseLeave:s,...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:i("rt-reset","rt-BaseMenuItem","rt-SidebarMenuButton","rt-SidebarMenuSubTrigger",o),"data-highlighted":m||void 0,onMouseEnter:p=>{l(!0),a?.(p)},onMouseLeave:p=>{l(!1),s?.(p)}},r?t:e.createElement(e.Fragment,null,t,e.createElement(O,{className:i("rt-BaseMenuSubTriggerIcon","rt-SidebarMenuSubTriggerIcon")})))))});V.displayName="Sidebar.MenuSubTrigger";const D=e.forwardRef(({className:r,children:o,...t},a)=>e.createElement(C.Content,{...t,ref:a,className:i("rt-SidebarMenuSubContent",r)},e.createElement("div",{className:"rt-SidebarMenuSubList"},o)));D.displayName="Sidebar.MenuSubContent";const W=e.forwardRef(({className:r,...o},t)=>e.createElement("div",{...o,ref:t,className:i("rt-BaseMenuGroup","rt-SidebarGroup",r)}));W.displayName="Sidebar.Group";const A=e.forwardRef(({asChild:r=!1,className:o,...t},a)=>e.createElement(r?N:"div",{...t,ref:a,role:"group",className:i("rt-BaseMenuLabel","rt-SidebarGroupLabel",o)}));A.displayName="Sidebar.GroupLabel";const k=e.forwardRef(({className:r,...o},t)=>e.createElement("div",{...o,ref:t,className:i("rt-SidebarGroupContent",r)}));k.displayName="Sidebar.GroupContent";export{L as Content,x as Footer,W as Group,k as GroupContent,A as GroupLabel,R as Header,z as Menu,G as MenuButton,w as MenuItem,I as MenuSub,D as MenuSubContent,V as MenuSubTrigger,H as Root,E as Separator};
1
+ "use client";import*as e from"react";import i from"classnames";import{Slot as N}from"./slot.js";import{Accordion as C}from"radix-ui";import{sidebarPropDefs as b}from"./sidebar.props.js";import{useThemeContext as F}from"./theme.js";import{ScrollArea as j}from"./scroll-area.js";import{Separator as K}from"./separator.js";import{ThickChevronRightIcon as O}from"./icons.js";import{extractProps as _}from"../helpers/extract-props.js";import{Kbd as q}from"./kbd.js";import{Badge as T}from"./badge.js";const B=e.createContext(null);function P(){return e.useContext(B)}const H=e.forwardRef((r,o)=>{const t=F(),{size:a=b.size.default,variant:s=b.variant.default,menuVariant:d=b.menuVariant.default,layout:u=b.layout.default,panelBackground:m,color:l,highContrast:p=b.highContrast.default}=r,{className:M,children:h,...v}=_(r,b),{asChild:$,panelBackground:g,...y}=v,f=l||t.accentColor,c=u||"panel",n=typeof a=="object"?a.initial||"2":a;return e.createElement("div",{...y,ref:o,"data-accent-color":f,className:i("rt-SidebarRoot",M)},e.createElement(B.Provider,{value:{size:n,menuVariant:d}},e.createElement("div",{className:i("rt-SidebarContainer",`rt-variant-${s}`,`rt-r-size-${n}`,`rt-menu-variant-${d}`,c&&`rt-layout-${c}`),"data-accent-color":f,"data-high-contrast":p||void 0,"data-panel-background":m,"data-layout":c},h)))});H.displayName="Sidebar.Root";const L=e.forwardRef(({className:r,children:o,role:t="navigation","aria-label":a="Main navigation",id:s,...d},u)=>{const m=P(),l=m?.size??"2",p=m?.menuVariant??"soft";return e.createElement(j,{type:"hover"},e.createElement("div",{...d,ref:u,id:s,role:t,"aria-label":a,className:i("rt-BaseMenuContent","rt-SidebarContent",`rt-r-size-${l}`,`rt-menu-variant-${p}`,r)},e.createElement("div",{className:"rt-BaseMenuViewport"},o)))});L.displayName="Sidebar.Content";const R=e.forwardRef(({className:r,asContainer:o=!0,...t},a)=>{const s=P(),d=s?.size??"2",u=s?.menuVariant??"soft";return e.createElement("div",{...t,ref:a,className:i("rt-SidebarHeader",`rt-r-size-${d}`,`rt-menu-variant-${u}`,{"rt-SidebarHeader--container":o},r)})});R.displayName="Sidebar.Header";const x=e.forwardRef(({className:r,asContainer:o=!0,...t},a)=>{const s=P(),d=s?.size??"2",u=s?.menuVariant??"soft";return e.createElement("div",{...t,ref:a,className:i("rt-SidebarFooter",`rt-r-size-${d}`,`rt-menu-variant-${u}`,{"rt-SidebarFooter--container":o},r)})});x.displayName="Sidebar.Footer";const E=e.forwardRef(({className:r,...o},t)=>e.createElement(K,{...o,ref:t,className:i("rt-SidebarSeparator",r)}));E.displayName="Sidebar.Separator";const z=e.forwardRef(({className:r,...o},t)=>e.createElement("ul",{...o,ref:t,role:"menu",className:i("rt-SidebarMenu",r)}));z.displayName="Sidebar.Menu";const w=e.forwardRef(({className:r,...o},t)=>e.createElement("li",{...o,ref:t,className:i("rt-SidebarMenuItem",r)}));w.displayName="Sidebar.MenuItem";const G=e.forwardRef(({asChild:r=!1,isActive:o=!1,shortcut:t,badge:a,className:s,children:d,onMouseEnter:u,onMouseLeave:m,onKeyDown:l,...p},M)=>{const[h,v]=e.useState(!1),g=P()?.size??"2",y=r?N:"button",{onClick:f}=p,c=e.useCallback(n=>{switch(n.key){case"Enter":case" ":n.preventDefault(),f&&f(n);break;case"ArrowDown":{n.preventDefault();const S=n.currentTarget.nextElementSibling?.querySelector('[role="menuitem"]');S&&S.focus();break}case"ArrowUp":{n.preventDefault();const S=n.currentTarget.previousElementSibling?.querySelector('[role="menuitem"]');S&&S.focus();break}}l?.(n)},[f,l]);return e.createElement(y,{...p,ref:M,role:"menuitem","aria-current":o?"page":void 0,className:i("rt-reset","rt-BaseMenuItem","rt-SidebarMenuButton",s),"data-active":o||void 0,"data-highlighted":h||void 0,onKeyDown:c,onMouseEnter:n=>{v(!0),u?.(n)},onMouseLeave:n=>{v(!1),m?.(n)}},r?d:e.createElement(e.Fragment,null,d,a&&e.createElement("div",{className:"rt-SidebarMenuBadge"},typeof a=="string"?e.createElement(T,{size:g,variant:"soft"},a):e.createElement(T,{size:a.size||g,variant:a.variant||"soft",color:a.color,highContrast:a.highContrast,radius:a.radius},a.content)),t&&e.createElement("div",{className:"rt-BaseMenuShortcut rt-SidebarMenuShortcut"},e.createElement(q,{size:g},t))))});G.displayName="Sidebar.MenuButton";const I=e.forwardRef(({defaultOpen:r=!1,children:o,...t},a)=>e.createElement("div",{...t,ref:a},e.createElement(C.Root,{type:"single",collapsible:!0,defaultValue:r?"item":void 0},e.createElement(C.Item,{value:"item"},o))));I.displayName="Sidebar.MenuSub";const V=e.forwardRef(({asChild:r=!1,className:o,children:t,onMouseEnter:a,onMouseLeave:s,...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:i("rt-reset","rt-BaseMenuItem","rt-SidebarMenuButton","rt-SidebarMenuSubTrigger",o),"data-highlighted":m||void 0,onMouseEnter:p=>{l(!0),a?.(p)},onMouseLeave:p=>{l(!1),s?.(p)}},r?t:e.createElement(e.Fragment,null,t,e.createElement(O,{className:i("rt-BaseMenuSubTriggerIcon","rt-SidebarMenuSubTriggerIcon")})))))});V.displayName="Sidebar.MenuSubTrigger";const D=e.forwardRef(({className:r,children:o,...t},a)=>e.createElement(C.Content,{...t,ref:a,className:i("rt-SidebarMenuSubContent",r)},e.createElement("div",{className:"rt-SidebarMenuSubList"},o)));D.displayName="Sidebar.MenuSubContent";const W=e.forwardRef(({className:r,...o},t)=>e.createElement("div",{...o,ref:t,className:i("rt-BaseMenuGroup","rt-SidebarGroup",r)}));W.displayName="Sidebar.Group";const A=e.forwardRef(({asChild:r=!1,className:o,...t},a)=>e.createElement(r?N:"div",{...t,ref:a,role:"group",className:i("rt-BaseMenuLabel","rt-SidebarGroupLabel",o)}));A.displayName="Sidebar.GroupLabel";const k=e.forwardRef(({className:r,...o},t)=>e.createElement("div",{...o,ref:t,className:i("rt-SidebarGroupContent",r)}));k.displayName="Sidebar.GroupContent";export{L as Content,x as Footer,W as Group,k as GroupContent,A as GroupLabel,R as Header,z as Menu,G as MenuButton,w as MenuItem,I as MenuSub,D as MenuSubContent,V as MenuSubTrigger,H as Root,E as Separator};
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 { Accordion } from 'radix-ui';\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 {children}\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-BaseMenuViewport', '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": "aAEA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,QAAAC,MAAY,YACrB,OAAS,aAAAC,MAAiB,WAE1B,OAAS,mBAAAC,MAAuB,qBAChC,OAAS,mBAAAC,MAAuB,aAEhC,OAAS,cAAAC,MAAkB,mBAC3B,OAAS,aAAAC,MAAiB,iBAC1B,OAAS,yBAAAC,MAA6B,aACtC,OAAS,gBAAAC,MAAoB,8BAC7B,OAAS,OAAAC,MAAW,WACpB,OAAS,SAAAC,MAAa,aAqBtB,MAAMC,EAAuBZ,EAAM,cAAgD,IAAI,EACvF,SAASa,GAAmB,CAC1B,OAAOb,EAAM,WAAWY,CAAoB,CAC9C,CAQA,MAAME,EAAUd,EAAM,WAAyC,CAACe,EAAOC,IAAiB,CACtF,MAAMC,EAAeZ,EAAgB,EAE/B,CACJ,KAAAa,EAAOd,EAAgB,KAAK,QAC5B,QAAAe,EAAUf,EAAgB,QAAQ,QAClC,YAAAgB,EAAchB,EAAgB,YAAY,QAC1C,OAAAiB,EAASjB,EAAgB,OAAO,QAIhC,gBAAAkB,EACA,MAAAC,EACA,aAAAC,EAAepB,EAAgB,aAAa,OAC9C,EAAIW,EAEE,CAAE,UAAAU,EAAW,SAAAC,EAAU,GAAGC,CAAU,EAAIlB,EAAaM,EAAOX,CAAe,EAC3E,CAAE,QAASwB,EAAG,gBAAiBC,EAAI,GAAGC,CAAc,EAAIH,EACxDI,EAAgBR,GAASN,EAAa,YAGtCe,EAAiBX,GAAU,QAG3BY,EAAe,OAAOf,GAAS,SAAWA,EAAK,SAAW,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,EAAA,CACC,UAAWP,EACT,4BACA,8BACF,EACF,CACF,CAEJ,CACF,CACF,CAEJ,CACF,EACA+D,EAAsB,YAAc,yBAKpC,MAAMC,EAAwBjE,EAAM,WAGlC,CAAC,CAAE,UAAAyB,EAAW,SAAAC,EAAU,GAAGX,CAAM,EAAGC,IAElChB,EAAA,cAACG,EAAU,QAAV,CACE,GAAGY,EACJ,IAAKC,EACL,UAAWf,EAAW,2BAA4BwB,CAAS,GAE3DzB,EAAA,cAAC,OAAI,UAAU,yBAAyB0B,CAAS,CACnD,CAEH,EACDuC,EAAsB,YAAc,yBAKpC,MAAMC,EAAelE,EAAM,WACzB,CAAC,CAAE,UAAAyB,EAAW,GAAGV,CAAM,EAAGC,IACxBhB,EAAA,cAAC,OACE,GAAGe,EACJ,IAAKC,EACL,UAAWf,EAAW,mBAAoB,kBAAmBwB,CAAS,EACxE,CAEJ,EACAyC,EAAa,YAAc,gBAM3B,MAAMC,EAAoBnE,EAAM,WAC9B,CAAC,CAAE,QAAA8C,EAAU,GAAO,UAAArB,EAAW,GAAGV,CAAM,EAAGC,IAIvChB,EAAA,cAHW8C,EAAU5C,EAAO,MAG3B,CACE,GAAGa,EACJ,IAAKC,EACL,KAAK,QACL,UAAWf,EAAW,mBAAoB,uBAAwBwB,CAAS,EAC7E,CAGN,EACA0C,EAAkB,YAAc,qBAIhC,MAAMC,EAAsBpE,EAAM,WAChC,CAAC,CAAE,UAAAyB,EAAW,GAAGV,CAAM,EAAGC,IACxBhB,EAAA,cAAC,OACE,GAAGe,EACJ,IAAKC,EACL,UAAWf,EAAW,yBAA0BwB,CAAS,EAC3D,CAEJ,EACA2C,EAAoB,YAAc",
4
+ "sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Slot } from './slot.js';\nimport { Accordion } from 'radix-ui';\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": "aAEA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,QAAAC,MAAY,YACrB,OAAS,aAAAC,MAAiB,WAE1B,OAAS,mBAAAC,MAAuB,qBAChC,OAAS,mBAAAC,MAAuB,aAEhC,OAAS,cAAAC,MAAkB,mBAC3B,OAAS,aAAAC,MAAiB,iBAC1B,OAAS,yBAAAC,MAA6B,aACtC,OAAS,gBAAAC,MAAoB,8BAC7B,OAAS,OAAAC,MAAW,WACpB,OAAS,SAAAC,MAAa,aAqBtB,MAAMC,EAAuBZ,EAAM,cAAgD,IAAI,EACvF,SAASa,GAAmB,CAC1B,OAAOb,EAAM,WAAWY,CAAoB,CAC9C,CAQA,MAAME,EAAUd,EAAM,WAAyC,CAACe,EAAOC,IAAiB,CACtF,MAAMC,EAAeZ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ACE,GAAGa,EACJ,IAAKC,EACL,KAAK,QACL,UAAWf,EAAW,mBAAoB,uBAAwBwB,CAAS,EAC7E,CAGN,EACA0C,EAAkB,YAAc,qBAIhC,MAAMC,EAAsBpE,EAAM,WAChC,CAAC,CAAE,UAAAyB,EAAW,GAAGV,CAAM,EAAGC,IACxBhB,EAAA,cAAC,OACE,GAAGe,EACJ,IAAKC,EACL,UAAWf,EAAW,yBAA0BwB,CAAS,EAC3D,CAEJ,EACA2C,EAAoB,YAAc",
6
6
  "names": ["React", "classNames", "Slot", "Accordion", "sidebarPropDefs", "useThemeContext", "ScrollArea", "Separator", "ThickChevronRightIcon", "extractProps", "Kbd", "Badge", "SidebarVisualContext", "useSidebarVisual", "Sidebar", "props", "forwardedRef", "themeContext", "size", "variant", "menuVariant", "layout", "panelBackground", "color", "highContrast", "className", "children", "rootProps", "_", "__", "safeRootProps", "resolvedColor", "resolvedLayout", "resolvedSize", "SidebarContent", "role", "ariaLabel", "id", "visual", "SidebarHeader", "asContainer", "SidebarFooter", "SidebarSeparator", "SidebarMenu", "SidebarMenuItem", "SidebarMenuButton", "asChild", "isActive", "shortcut", "badge", "onMouseEnter", "onMouseLeave", "onKeyDown", "isHighlighted", "setIsHighlighted", "sidebarSize", "Comp", "onClick", "handleKeyDown", "event", "nextItem", "prevItem", "SidebarMenuSub", "defaultOpen", "SidebarMenuSubTrigger", "SidebarMenuSubContent", "SidebarGroup", "SidebarGroupLabel", "SidebarGroupContent"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kushagradhawan/kookie-ui",
3
- "version": "0.1.42",
3
+ "version": "0.1.44",
4
4
  "description": "A modern React component library with beautiful design tokens, flexible theming, and comprehensive docs",
5
5
  "keywords": [
6
6
  "react",
@@ -279,6 +279,6 @@
279
279
  "title": "Base-button Component Props",
280
280
  "description": "Props schema for the base-button component in Kookie UI",
281
281
  "version": "1.0.0",
282
- "generatedAt": "2025-09-09T20:52:02.765Z",
282
+ "generatedAt": "2025-09-10T07:32:12.386Z",
283
283
  "source": "Zod schema"
284
284
  }
@@ -530,6 +530,6 @@
530
530
  "title": "Button Component Props",
531
531
  "description": "Props schema for the button component in Kookie UI",
532
532
  "version": "1.0.0",
533
- "generatedAt": "2025-09-09T20:52:02.770Z",
533
+ "generatedAt": "2025-09-10T07:32:12.390Z",
534
534
  "source": "Zod schema"
535
535
  }
@@ -313,6 +313,6 @@
313
313
  "title": "Icon-button Component Props",
314
314
  "description": "Props schema for the icon-button component in Kookie UI",
315
315
  "version": "1.0.0",
316
- "generatedAt": "2025-09-09T20:52:02.771Z",
316
+ "generatedAt": "2025-09-10T07:32:12.391Z",
317
317
  "source": "Zod schema"
318
318
  }
@@ -3,7 +3,7 @@
3
3
  "title": "Kookie UI Button Components",
4
4
  "description": "Complete JSON Schema collection for all button components in Kookie UI",
5
5
  "version": "1.0.0",
6
- "generatedAt": "2025-09-09T20:52:02.773Z",
6
+ "generatedAt": "2025-09-10T07:32:12.394Z",
7
7
  "source": "Zod schemas",
8
8
  "components": {
9
9
  "base-button": {
@@ -287,7 +287,7 @@
287
287
  "title": "Base-button Component Props",
288
288
  "description": "Props schema for the base-button component in Kookie UI",
289
289
  "version": "1.0.0",
290
- "generatedAt": "2025-09-09T20:52:02.765Z",
290
+ "generatedAt": "2025-09-10T07:32:12.386Z",
291
291
  "source": "Zod schema"
292
292
  },
293
293
  "button": {
@@ -822,7 +822,7 @@
822
822
  "title": "Button Component Props",
823
823
  "description": "Props schema for the button component in Kookie UI",
824
824
  "version": "1.0.0",
825
- "generatedAt": "2025-09-09T20:52:02.770Z",
825
+ "generatedAt": "2025-09-10T07:32:12.390Z",
826
826
  "source": "Zod schema"
827
827
  },
828
828
  "icon-button": {
@@ -1140,7 +1140,7 @@
1140
1140
  "title": "Icon-button Component Props",
1141
1141
  "description": "Props schema for the icon-button component in Kookie UI",
1142
1142
  "version": "1.0.0",
1143
- "generatedAt": "2025-09-09T20:52:02.771Z",
1143
+ "generatedAt": "2025-09-10T07:32:12.391Z",
1144
1144
  "source": "Zod schema"
1145
1145
  },
1146
1146
  "toggle-button": {
@@ -1683,7 +1683,7 @@
1683
1683
  "title": "Toggle-button Component Props",
1684
1684
  "description": "Props schema for the toggle-button component in Kookie UI",
1685
1685
  "version": "1.0.0",
1686
- "generatedAt": "2025-09-09T20:52:02.772Z",
1686
+ "generatedAt": "2025-09-10T07:32:12.393Z",
1687
1687
  "source": "Zod schema"
1688
1688
  },
1689
1689
  "toggle-icon-button": {
@@ -2009,7 +2009,7 @@
2009
2009
  "title": "Toggle-icon-button Component Props",
2010
2010
  "description": "Props schema for the toggle-icon-button component in Kookie UI",
2011
2011
  "version": "1.0.0",
2012
- "generatedAt": "2025-09-09T20:52:02.773Z",
2012
+ "generatedAt": "2025-09-10T07:32:12.394Z",
2013
2013
  "source": "Zod schema"
2014
2014
  }
2015
2015
  }
@@ -538,6 +538,6 @@
538
538
  "title": "Toggle-button Component Props",
539
539
  "description": "Props schema for the toggle-button component in Kookie UI",
540
540
  "version": "1.0.0",
541
- "generatedAt": "2025-09-09T20:52:02.772Z",
541
+ "generatedAt": "2025-09-10T07:32:12.393Z",
542
542
  "source": "Zod schema"
543
543
  }
@@ -321,6 +321,6 @@
321
321
  "title": "Toggle-icon-button Component Props",
322
322
  "description": "Props schema for the toggle-icon-button component in Kookie UI",
323
323
  "version": "1.0.0",
324
- "generatedAt": "2025-09-09T20:52:02.773Z",
324
+ "generatedAt": "2025-09-10T07:32:12.394Z",
325
325
  "source": "Zod schema"
326
326
  }
@@ -5,7 +5,7 @@
5
5
  flex: 1;
6
6
  display: flex;
7
7
  flex-direction: column;
8
- padding: var(--base-menu-content-padding);
8
+ padding-bottom: var(--base-menu-content-padding);
9
9
  box-sizing: border-box;
10
10
  list-style: none;
11
11
  margin: 0;
@@ -164,11 +164,6 @@
164
164
  font-size: var(--font-size-2);
165
165
  }
166
166
 
167
- /* Sidebar Group Components - identical to base menu */
168
- .rt-SidebarGroup {
169
- /* No styling - purely semantic like BaseMenuGroup */
170
- }
171
-
172
167
  .rt-SidebarGroupLabel {
173
168
  /* Inherit all BaseMenuLabel styles */
174
169
  display: flex;
@@ -218,6 +213,6 @@
218
213
 
219
214
  /* Add balanced spacing for sidebar menu items while preserving base menu border radius */
220
215
  .rt-SidebarContent :where(.rt-BaseMenuItem) {
221
- margin-top: calc(var(--space-1) / 2);
222
- margin-bottom: calc(var(--space-1) / 2);
216
+ margin-top: calc(var(--space-1) / 4);
217
+ margin-bottom: calc(var(--space-1) / 4);
223
218
  }
@@ -69,7 +69,7 @@
69
69
  .rt-SidebarContainer:where(.rt-variant-outline) {
70
70
  background-color: var(--color-panel);
71
71
  backdrop-filter: var(--backdrop-filter-panel);
72
-
72
+
73
73
  /* Component-level overrides (higher specificity) - remap --color-panel */
74
74
  &:where([data-panel-background='solid']) {
75
75
  --color-panel: var(--color-panel-solid);
@@ -84,18 +84,18 @@
84
84
  --backdrop-filter-panel: blur(var(--backdrop-blur-panel));
85
85
  --backdrop-filter-components: blur(var(--backdrop-blur-components));
86
86
  }
87
-
87
+
88
88
  /* Floating sidebars get full inset border */
89
- :where(.rt-SidebarRoot[data-type="floating"]) & {
89
+ :where(.rt-SidebarRoot[data-type='floating']) & {
90
90
  box-shadow: inset 0 0 0 1px var(--gray-a6);
91
91
  }
92
-
92
+
93
93
  /* Non-floating sidebars get border only on the content-facing side */
94
- :where(.rt-SidebarRoot[data-type="sidebar"][data-side="left"]) & {
94
+ :where(.rt-SidebarRoot[data-type='sidebar'][data-side='left']) & {
95
95
  box-shadow: inset -1px 0 0 0 var(--gray-a6);
96
96
  }
97
-
98
- :where(.rt-SidebarRoot[data-type="sidebar"][data-side="right"]) & {
97
+
98
+ :where(.rt-SidebarRoot[data-type='sidebar'][data-side='right']) & {
99
99
  box-shadow: inset 1px 0 0 0 var(--gray-a6);
100
100
  }
101
101
  }
@@ -134,7 +134,7 @@
134
134
  .rt-SidebarContainer:where(.rt-variant-surface) {
135
135
  /* Base state: neutral gray background (maintains sidebar neutrality) */
136
136
  background-color: var(--gray-1);
137
-
137
+
138
138
  /* Theme-level translucent override */
139
139
  :where([data-panel-background='translucent']) & {
140
140
  background-color: color-mix(in srgb, var(--gray-a1), var(--gray-1) 60%);
@@ -155,31 +155,31 @@
155
155
  --backdrop-filter-panel: blur(var(--backdrop-blur-panel));
156
156
  --backdrop-filter-components: blur(var(--backdrop-blur-components));
157
157
  }
158
-
158
+
159
159
  /* Inset border like Card surface variant */
160
160
  /* Floating sidebars get full inset border */
161
- :where(.rt-SidebarRoot[data-type="floating"]) & {
161
+ :where(.rt-SidebarRoot[data-type='floating']) & {
162
162
  box-shadow: inset 0 0 0 1px var(--gray-6);
163
-
163
+
164
164
  /* Theme-level translucent override */
165
165
  :where([data-panel-background='translucent']) & {
166
166
  box-shadow: inset 0 0 0 1px var(--gray-a6);
167
167
  }
168
168
  }
169
-
169
+
170
170
  /* Non-floating sidebars get border only on the content-facing side */
171
- :where(.rt-SidebarRoot[data-type="sidebar"][data-side="left"]) & {
171
+ :where(.rt-SidebarRoot[data-type='sidebar'][data-side='left']) & {
172
172
  box-shadow: inset -1px 0 0 0 var(--gray-6);
173
-
173
+
174
174
  /* Theme-level translucent override */
175
175
  :where([data-panel-background='translucent']) & {
176
176
  box-shadow: inset -1px 0 0 0 var(--gray-a6);
177
177
  }
178
178
  }
179
-
180
- :where(.rt-SidebarRoot[data-type="sidebar"][data-side="right"]) & {
179
+
180
+ :where(.rt-SidebarRoot[data-type='sidebar'][data-side='right']) & {
181
181
  box-shadow: inset 1px 0 0 0 var(--gray-6);
182
-
182
+
183
183
  /* Theme-level translucent override */
184
184
  :where([data-panel-background='translucent']) & {
185
185
  box-shadow: inset 1px 0 0 0 var(--gray-a6);
@@ -195,7 +195,7 @@
195
195
  gap: var(--space-2);
196
196
  padding: var(--base-menu-content-padding);
197
197
  min-height: var(--base-menu-item-height);
198
-
198
+
199
199
  /* Make MenuButtons expand to full width */
200
200
  & :where(.rt-SidebarMenuButton) {
201
201
  flex: 1;
@@ -209,7 +209,7 @@
209
209
  gap: var(--space-2);
210
210
  padding: var(--base-menu-content-padding);
211
211
  min-height: var(--base-menu-item-height);
212
-
212
+
213
213
  /* Make MenuButtons expand to full width */
214
214
  & :where(.rt-SidebarMenuButton) {
215
215
  flex: 1;
@@ -217,33 +217,85 @@
217
217
  }
218
218
 
219
219
  /* Flex utilities for header/footer layouts */
220
- .rt-SidebarHeader:where(.rt-flex-row) { flex-direction: row; }
221
- .rt-SidebarHeader:where(.rt-flex-col) { flex-direction: column; }
222
- .rt-SidebarHeader:where(.rt-items-center) { align-items: center; }
223
- .rt-SidebarHeader:where(.rt-items-start) { align-items: flex-start; }
224
- .rt-SidebarHeader:where(.rt-items-end) { align-items: flex-end; }
225
- .rt-SidebarHeader:where(.rt-justify-between) { justify-content: space-between; }
226
- .rt-SidebarHeader:where(.rt-justify-center) { justify-content: center; }
227
- .rt-SidebarHeader:where(.rt-justify-start) { justify-content: flex-start; }
228
- .rt-SidebarHeader:where(.rt-justify-end) { justify-content: flex-end; }
229
- .rt-SidebarHeader:where(.rt-gap-1) { gap: var(--space-1); }
230
- .rt-SidebarHeader:where(.rt-gap-2) { gap: var(--space-2); }
231
- .rt-SidebarHeader:where(.rt-gap-3) { gap: var(--space-3); }
232
- .rt-SidebarHeader:where(.rt-gap-4) { gap: var(--space-4); }
233
-
234
- .rt-SidebarFooter:where(.rt-flex-row) { flex-direction: row; }
235
- .rt-SidebarFooter:where(.rt-flex-col) { flex-direction: column; }
236
- .rt-SidebarFooter:where(.rt-items-center) { align-items: center; }
237
- .rt-SidebarFooter:where(.rt-items-start) { align-items: flex-start; }
238
- .rt-SidebarFooter:where(.rt-items-end) { align-items: flex-end; }
239
- .rt-SidebarFooter:where(.rt-justify-between) { justify-content: space-between; }
240
- .rt-SidebarFooter:where(.rt-justify-center) { justify-content: center; }
241
- .rt-SidebarFooter:where(.rt-justify-start) { justify-content: flex-start; }
242
- .rt-SidebarFooter:where(.rt-justify-end) { justify-content: flex-end; }
243
- .rt-SidebarFooter:where(.rt-gap-1) { gap: var(--space-1); }
244
- .rt-SidebarFooter:where(.rt-gap-2) { gap: var(--space-2); }
245
- .rt-SidebarFooter:where(.rt-gap-3) { gap: var(--space-3); }
246
- .rt-SidebarFooter:where(.rt-gap-4) { gap: var(--space-4); }
220
+ .rt-SidebarHeader:where(.rt-flex-row) {
221
+ flex-direction: row;
222
+ }
223
+ .rt-SidebarHeader:where(.rt-flex-col) {
224
+ flex-direction: column;
225
+ }
226
+ .rt-SidebarHeader:where(.rt-items-center) {
227
+ align-items: center;
228
+ }
229
+ .rt-SidebarHeader:where(.rt-items-start) {
230
+ align-items: flex-start;
231
+ }
232
+ .rt-SidebarHeader:where(.rt-items-end) {
233
+ align-items: flex-end;
234
+ }
235
+ .rt-SidebarHeader:where(.rt-justify-between) {
236
+ justify-content: space-between;
237
+ }
238
+ .rt-SidebarHeader:where(.rt-justify-center) {
239
+ justify-content: center;
240
+ }
241
+ .rt-SidebarHeader:where(.rt-justify-start) {
242
+ justify-content: flex-start;
243
+ }
244
+ .rt-SidebarHeader:where(.rt-justify-end) {
245
+ justify-content: flex-end;
246
+ }
247
+ .rt-SidebarHeader:where(.rt-gap-1) {
248
+ gap: var(--space-1);
249
+ }
250
+ .rt-SidebarHeader:where(.rt-gap-2) {
251
+ gap: var(--space-2);
252
+ }
253
+ .rt-SidebarHeader:where(.rt-gap-3) {
254
+ gap: var(--space-3);
255
+ }
256
+ .rt-SidebarHeader:where(.rt-gap-4) {
257
+ gap: var(--space-4);
258
+ }
259
+
260
+ .rt-SidebarFooter:where(.rt-flex-row) {
261
+ flex-direction: row;
262
+ }
263
+ .rt-SidebarFooter:where(.rt-flex-col) {
264
+ flex-direction: column;
265
+ }
266
+ .rt-SidebarFooter:where(.rt-items-center) {
267
+ align-items: center;
268
+ }
269
+ .rt-SidebarFooter:where(.rt-items-start) {
270
+ align-items: flex-start;
271
+ }
272
+ .rt-SidebarFooter:where(.rt-items-end) {
273
+ align-items: flex-end;
274
+ }
275
+ .rt-SidebarFooter:where(.rt-justify-between) {
276
+ justify-content: space-between;
277
+ }
278
+ .rt-SidebarFooter:where(.rt-justify-center) {
279
+ justify-content: center;
280
+ }
281
+ .rt-SidebarFooter:where(.rt-justify-start) {
282
+ justify-content: flex-start;
283
+ }
284
+ .rt-SidebarFooter:where(.rt-justify-end) {
285
+ justify-content: flex-end;
286
+ }
287
+ .rt-SidebarFooter:where(.rt-gap-1) {
288
+ gap: var(--space-1);
289
+ }
290
+ .rt-SidebarFooter:where(.rt-gap-2) {
291
+ gap: var(--space-2);
292
+ }
293
+ .rt-SidebarFooter:where(.rt-gap-3) {
294
+ gap: var(--space-3);
295
+ }
296
+ .rt-SidebarFooter:where(.rt-gap-4) {
297
+ gap: var(--space-4);
298
+ }
247
299
 
248
300
  /* Header/Footer Menu Button Support */
249
301
  .rt-SidebarHeader :where(.rt-SidebarMenuButton),
@@ -266,21 +318,22 @@
266
318
  text-align: left;
267
319
  cursor: var(--cursor-menu-item);
268
320
  user-select: none;
269
-
321
+
270
322
  /* Header/Footer-specific styling */
271
323
  justify-content: flex-start;
272
-
324
+
273
325
  /* Transitions */
274
- transition: background var(--motion-duration-small) var(--motion-ease-standard),
275
- box-shadow var(--motion-duration-small) var(--motion-ease-standard),
276
- filter var(--motion-duration-small) var(--motion-ease-standard);
277
-
326
+ transition:
327
+ background var(--motion-duration-small) var(--motion-ease-standard),
328
+ box-shadow var(--motion-duration-small) var(--motion-ease-standard),
329
+ filter var(--motion-duration-small) var(--motion-ease-standard);
330
+
278
331
  /* Focus state */
279
332
  &:where(:focus-visible) {
280
333
  outline: 2px solid var(--focus-8);
281
334
  outline-offset: 2px;
282
335
  }
283
-
336
+
284
337
  /* Reduced motion support */
285
338
  @media (prefers-reduced-motion: reduce) {
286
339
  transition: none;
@@ -397,15 +450,17 @@
397
450
  /* Sub-trigger transitions - match base menu */
398
451
  & :where(.rt-SidebarMenuSubTrigger) {
399
452
  transition: var(--transition-menu);
400
-
453
+
401
454
  /* Reduced motion support */
402
455
  @media (prefers-reduced-motion: reduce) {
403
456
  transition: none;
404
457
  }
405
-
458
+
406
459
  /* Remove backdrop-filter transitions in translucent mode to prevent flickering */
407
460
  :where([data-panel-background='translucent']) & {
408
- transition: background var(--duration-1) var(--ease-1), color var(--duration-2) var(--ease-1);
461
+ transition:
462
+ background var(--duration-1) var(--ease-1),
463
+ color var(--duration-2) var(--ease-1);
409
464
  }
410
465
  }
411
466
 
@@ -413,7 +468,7 @@
413
468
  & :where(.rt-SidebarMenuSubTrigger[data-state='open']) {
414
469
  /* Base state: solid gray for solid panels */
415
470
  background-color: var(--gray-3);
416
-
471
+
417
472
  /* Theme-level translucent override */
418
473
  :where([data-panel-background='translucent']) & {
419
474
  background-color: var(--gray-a3);
@@ -435,7 +490,9 @@
435
490
  & :where(.rt-SidebarMenuButton) {
436
491
  /* Remove backdrop-filter transitions in translucent mode to prevent flickering */
437
492
  :where([data-panel-background='translucent']) & {
438
- transition: background var(--duration-1) var(--ease-1), color var(--duration-2) var(--ease-1);
493
+ transition:
494
+ background var(--duration-1) var(--ease-1),
495
+ color var(--duration-2) var(--ease-1);
439
496
  }
440
497
  }
441
498
 
@@ -576,15 +633,17 @@
576
633
  /* Sub-trigger transitions - match base menu */
577
634
  & :where(.rt-SidebarMenuSubTrigger) {
578
635
  transition: var(--transition-menu);
579
-
636
+
580
637
  /* Reduced motion support */
581
638
  @media (prefers-reduced-motion: reduce) {
582
639
  transition: none;
583
640
  }
584
-
641
+
585
642
  /* Remove backdrop-filter transitions in translucent mode to prevent flickering */
586
643
  :where([data-panel-background='translucent']) & {
587
- transition: background var(--duration-1) var(--ease-1), color var(--duration-2) var(--ease-1);
644
+ transition:
645
+ background var(--duration-1) var(--ease-1),
646
+ color var(--duration-2) var(--ease-1);
588
647
  }
589
648
  }
590
649
 
@@ -592,7 +651,7 @@
592
651
  & :where(.rt-SidebarMenuSubTrigger[data-state='open']) {
593
652
  /* Base state: solid accent for solid panels */
594
653
  background-color: var(--accent-3);
595
-
654
+
596
655
  /* Theme-level translucent override */
597
656
  :where([data-panel-background='translucent']) & {
598
657
  background-color: var(--accent-a3);
@@ -614,7 +673,9 @@
614
673
  & :where(.rt-SidebarMenuButton) {
615
674
  /* Remove backdrop-filter transitions in translucent mode to prevent flickering */
616
675
  :where([data-panel-background='translucent']) & {
617
- transition: background var(--duration-1) var(--ease-1), color var(--duration-2) var(--ease-1);
676
+ transition:
677
+ background var(--duration-1) var(--ease-1),
678
+ color var(--duration-2) var(--ease-1);
618
679
  }
619
680
  }
620
681
 
@@ -622,7 +683,7 @@
622
683
  & :where(.rt-SidebarMenuButton[data-highlighted]) {
623
684
  /* Base state: solid accent for solid panels */
624
685
  background-color: var(--accent-4);
625
-
686
+
626
687
  /* Theme-level translucent override */
627
688
  :where([data-panel-background='translucent']) & {
628
689
  background-color: var(--accent-a4);
@@ -677,4 +738,4 @@
677
738
  }
678
739
  }
679
740
 
680
- /* Removed old icon-only collapsed mode rules in favor of Shell rail mode */
741
+ /* Removed old icon-only collapsed mode rules in favor of Shell rail mode */
@@ -138,7 +138,7 @@ const SidebarContent = React.forwardRef<HTMLDivElement, SidebarContentProps>(
138
138
  className,
139
139
  )}
140
140
  >
141
- {children}
141
+ <div className="rt-BaseMenuViewport">{children}</div>
142
142
  </div>
143
143
  </ScrollArea>
144
144
  );
@@ -243,7 +243,7 @@ const SidebarMenu = React.forwardRef<HTMLUListElement, SidebarMenuProps>(
243
243
  {...props}
244
244
  ref={forwardedRef}
245
245
  role="menu"
246
- className={classNames('rt-BaseMenuViewport', 'rt-SidebarMenu', className)}
246
+ className={classNames('rt-SidebarMenu', className)}
247
247
  />
248
248
  ),
249
249
  );
package/styles.css CHANGED
@@ -18982,7 +18982,7 @@
18982
18982
  flex: 1;
18983
18983
  display: flex;
18984
18984
  flex-direction: column;
18985
- padding: var(--base-menu-content-padding);
18985
+ padding-bottom: var(--base-menu-content-padding);
18986
18986
  box-sizing: border-box;
18987
18987
  list-style: none;
18988
18988
  margin: 0;
@@ -19135,8 +19135,8 @@
19135
19135
  padding-left: var(--space-2);
19136
19136
  }
19137
19137
  .rt-SidebarContent :where(.rt-BaseMenuItem){
19138
- margin-top: calc(var(--space-1) / 2);
19139
- margin-bottom: calc(var(--space-1) / 2);
19138
+ margin-top: calc(var(--space-1) / 4);
19139
+ margin-bottom: calc(var(--space-1) / 4);
19140
19140
  }
19141
19141
  :where(.rt-SidebarContainer.rt-layout-rail .rt-SidebarContent),
19142
19142
  .rt-ShellSidebarRail :where(.rt-SidebarContent),
@@ -19201,13 +19201,13 @@
19201
19201
  --backdrop-filter-panel: blur(var(--backdrop-blur-panel));
19202
19202
  --backdrop-filter-components: blur(var(--backdrop-blur-components));
19203
19203
  }
19204
- :where(.rt-SidebarRoot[data-type="floating"]) .rt-SidebarContainer:where(.rt-variant-outline){
19204
+ :where(.rt-SidebarRoot[data-type='floating']) .rt-SidebarContainer:where(.rt-variant-outline){
19205
19205
  box-shadow: inset 0 0 0 1px var(--gray-a6);
19206
19206
  }
19207
- :where(.rt-SidebarRoot[data-type="sidebar"][data-side="left"]) .rt-SidebarContainer:where(.rt-variant-outline){
19207
+ :where(.rt-SidebarRoot[data-type='sidebar'][data-side='left']) .rt-SidebarContainer:where(.rt-variant-outline){
19208
19208
  box-shadow: inset -1px 0 0 0 var(--gray-a6);
19209
19209
  }
19210
- :where(.rt-SidebarRoot[data-type="sidebar"][data-side="right"]) .rt-SidebarContainer:where(.rt-variant-outline){
19210
+ :where(.rt-SidebarRoot[data-type='sidebar'][data-side='right']) .rt-SidebarContainer:where(.rt-variant-outline){
19211
19211
  box-shadow: inset 1px 0 0 0 var(--gray-a6);
19212
19212
  }
19213
19213
  .rt-SidebarContainer:where(.rt-variant-ghost){
@@ -19259,22 +19259,22 @@
19259
19259
  --backdrop-filter-panel: blur(var(--backdrop-blur-panel));
19260
19260
  --backdrop-filter-components: blur(var(--backdrop-blur-components));
19261
19261
  }
19262
- :where(.rt-SidebarRoot[data-type="floating"]) .rt-SidebarContainer:where(.rt-variant-surface){
19262
+ :where(.rt-SidebarRoot[data-type='floating']) .rt-SidebarContainer:where(.rt-variant-surface){
19263
19263
  box-shadow: inset 0 0 0 1px var(--gray-6);
19264
19264
  }
19265
- :where([data-panel-background='translucent']) :is(:where(.rt-SidebarRoot[data-type="floating"]) .rt-SidebarContainer:where(.rt-variant-surface)){
19265
+ :where([data-panel-background='translucent']) :is(:where(.rt-SidebarRoot[data-type='floating']) .rt-SidebarContainer:where(.rt-variant-surface)){
19266
19266
  box-shadow: inset 0 0 0 1px var(--gray-a6);
19267
19267
  }
19268
- :where(.rt-SidebarRoot[data-type="sidebar"][data-side="left"]) .rt-SidebarContainer:where(.rt-variant-surface){
19268
+ :where(.rt-SidebarRoot[data-type='sidebar'][data-side='left']) .rt-SidebarContainer:where(.rt-variant-surface){
19269
19269
  box-shadow: inset -1px 0 0 0 var(--gray-6);
19270
19270
  }
19271
- :where([data-panel-background='translucent']) :is(:where(.rt-SidebarRoot[data-type="sidebar"][data-side="left"]) .rt-SidebarContainer:where(.rt-variant-surface)){
19271
+ :where([data-panel-background='translucent']) :is(:where(.rt-SidebarRoot[data-type='sidebar'][data-side='left']) .rt-SidebarContainer:where(.rt-variant-surface)){
19272
19272
  box-shadow: inset -1px 0 0 0 var(--gray-a6);
19273
19273
  }
19274
- :where(.rt-SidebarRoot[data-type="sidebar"][data-side="right"]) .rt-SidebarContainer:where(.rt-variant-surface){
19274
+ :where(.rt-SidebarRoot[data-type='sidebar'][data-side='right']) .rt-SidebarContainer:where(.rt-variant-surface){
19275
19275
  box-shadow: inset 1px 0 0 0 var(--gray-6);
19276
19276
  }
19277
- :where([data-panel-background='translucent']) :is(:where(.rt-SidebarRoot[data-type="sidebar"][data-side="right"]) .rt-SidebarContainer:where(.rt-variant-surface)){
19277
+ :where([data-panel-background='translucent']) :is(:where(.rt-SidebarRoot[data-type='sidebar'][data-side='right']) .rt-SidebarContainer:where(.rt-variant-surface)){
19278
19278
  box-shadow: inset 1px 0 0 0 var(--gray-a6);
19279
19279
  }
19280
19280
  .rt-SidebarHeader:where(.rt-SidebarHeader--container){