@sybilion/uilib 1.4.14 → 1.4.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-glossary/content-prompt.generated.ts +28 -23
- package/dist/agent-glossary/content.generated.ts +28 -23
- package/dist/agent-glossary/content.index.md +1 -1
- package/dist/agent-glossary/content.md +28 -23
- package/dist/agent-glossary/content.prompt.md +28 -23
- package/dist/agent-glossary/workspace.generated.ts +1 -1
- package/dist/agent-glossary/workspace.index.md +1 -1
- package/dist/agent-glossary/workspace.md +1 -1
- package/dist/esm/components/ui/Chat/ChatChrome/ChatChrome.js +28 -3
- package/dist/esm/components/ui/Chat/ChatSheet/useChatPanelChromeModel.js +31 -1
- package/dist/esm/components/ui/DropdownMenu/DropdownMenu.styl.js +2 -2
- package/dist/esm/components/ui/Page/Breadcrumbs/Breadcrumbs.js +28 -1
- package/dist/esm/components/ui/PanelResizeHandle/PanelResizeHandle.js +50 -0
- package/dist/esm/components/ui/Sidebar/Sidebar.styl.js +3 -3
- package/dist/esm/components/ui/Sidebar/SidebarAside.js +36 -0
- package/dist/esm/components/ui/Sidebar/SidebarContent/SidebarContent.js +13 -0
- package/dist/esm/components/ui/Sidebar/SidebarContent/SidebarContent.styl.js +7 -0
- package/dist/esm/components/ui/Sidebar/SidebarFooter/SidebarFooter.js +9 -0
- package/dist/esm/components/ui/Sidebar/SidebarFooter/SidebarFooter.styl.js +7 -0
- package/dist/esm/components/ui/Sidebar/SidebarGroup/SidebarGroup.js +9 -0
- package/dist/esm/components/ui/Sidebar/SidebarGroup/SidebarGroup.styl.js +7 -0
- package/dist/esm/components/ui/Sidebar/SidebarGroupAction/SidebarGroupAction.js +11 -0
- package/dist/esm/components/ui/Sidebar/SidebarGroupAction/SidebarGroupAction.styl.js +7 -0
- package/dist/esm/components/ui/Sidebar/SidebarMenu/SidebarMenu.js +15 -0
- package/dist/esm/components/ui/Sidebar/SidebarMenu/SidebarMenu.styl.js +7 -0
- package/dist/esm/components/ui/Sidebar/SidebarMenuAction/SidebarMenuAction.js +11 -0
- package/dist/esm/components/ui/Sidebar/SidebarMenuAction/SidebarMenuAction.styl.js +7 -0
- package/dist/esm/components/ui/Sidebar/SidebarMenuButton/SidebarMenuButton.js +16 -0
- package/dist/esm/components/ui/Sidebar/SidebarMenuButton/SidebarMenuButton.styl.js +7 -0
- package/dist/esm/components/ui/Sidebar/SidebarMenuSub/SidebarMenuSub.js +12 -0
- package/dist/esm/components/ui/Sidebar/SidebarMenuSub/SidebarMenuSub.styl.js +7 -0
- package/dist/esm/components/ui/Sidebar/SidebarMenuSubButton/SidebarMenuSubButton.js +32 -0
- package/dist/esm/components/ui/Sidebar/SidebarMenuSubButton/SidebarMenuSubButton.styl.js +7 -0
- package/dist/esm/components/ui/Sidebar/SidebarProvider/SidebarProvider.js +314 -0
- package/dist/esm/components/ui/Sidebar/SidebarProvider/SidebarProvider.styl.js +7 -0
- package/dist/esm/components/ui/Sidebar/SidebarRail/SidebarRail.js +11 -0
- package/dist/esm/components/ui/Sidebar/SidebarRail/SidebarRail.styl.js +7 -0
- package/dist/esm/components/ui/Sidebar/SidebarResizeHandle/SidebarResizeHandle.js +26 -0
- package/dist/esm/components/ui/Sidebar/SidebarResizeHandle/SidebarResizeHandle.styl.js +7 -0
- package/dist/esm/components/ui/Sidebar/SidebarSeparator/SidebarSeparator.js +10 -0
- package/dist/esm/components/ui/Sidebar/SidebarSeparator/SidebarSeparator.styl.js +7 -0
- package/dist/esm/components/ui/Sidebar/SidebarTrigger/SidebarTrigger.js +16 -0
- package/dist/esm/components/ui/Sidebar/SidebarTrigger/SidebarTrigger.styl.js +7 -0
- package/dist/esm/components/ui/Sidebar/sidebarConstants.js +7 -0
- package/dist/esm/components/ui/Sidebar/sidebarContext.js +28 -0
- package/dist/esm/components/ui/Sidebar/sidebarUtils.js +41 -0
- package/dist/esm/components/widgets/DriverMap/DriverMap.js +8 -8
- package/dist/esm/components/widgets/DriversComparisonChart/DriversComparisonChart.js +26 -5
- package/dist/esm/components/widgets/PerformanceChart/PerformanceChart.js +2 -2
- package/dist/esm/components/widgets/PerformanceChart/PerformanceTable.js +28 -6
- package/dist/esm/components/widgets/SidebarDatasetsItemsGrouped/SidebarDatasetsItemsGrouped.js +28 -1
- package/dist/esm/index.js +18 -1
- package/dist/esm/types/src/components/ui/PanelResizeHandle/PanelResizeHandle.d.ts +9 -0
- package/dist/esm/types/src/components/ui/Sidebar/Sidebar.d.ts +19 -108
- package/dist/esm/types/src/components/ui/Sidebar/Sidebar.types.d.ts +41 -0
- package/dist/esm/types/src/components/ui/Sidebar/SidebarAside.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Sidebar/SidebarContent/SidebarContent.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Sidebar/SidebarFooter/SidebarFooter.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Sidebar/SidebarGroup/SidebarGroup.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Sidebar/SidebarGroupAction/SidebarGroupAction.d.ts +4 -0
- package/dist/esm/types/src/components/ui/Sidebar/SidebarMenu/SidebarMenu.d.ts +4 -0
- package/dist/esm/types/src/components/ui/Sidebar/SidebarMenuAction/SidebarMenuAction.d.ts +5 -0
- package/dist/esm/types/src/components/ui/Sidebar/SidebarMenuButton/SidebarMenuButton.d.ts +10 -0
- package/dist/esm/types/src/components/ui/Sidebar/SidebarMenuSub/SidebarMenuSub.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Sidebar/SidebarMenuSubButton/SidebarMenuSubButton.d.ts +9 -0
- package/dist/esm/types/src/components/ui/Sidebar/SidebarProvider/SidebarProvider.d.ts +11 -0
- package/dist/esm/types/src/components/ui/Sidebar/SidebarRail/SidebarRail.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Sidebar/SidebarResizeHandle/SidebarResizeHandle.d.ts +4 -0
- package/dist/esm/types/src/components/ui/Sidebar/SidebarSeparator/SidebarSeparator.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Sidebar/SidebarTrigger/SidebarTrigger.d.ts +3 -0
- package/dist/esm/types/src/components/ui/Sidebar/sidebarConstants.d.ts +5 -0
- package/dist/esm/types/src/components/ui/Sidebar/sidebarContext.d.ts +7 -0
- package/dist/esm/types/src/components/ui/Sidebar/sidebarUtils.d.ts +3 -0
- package/dist/esm/types/src/components/widgets/DriverMap/DriverMap.d.ts +2 -1
- package/dist/esm/types/src/components/widgets/PerformanceChart/PerformanceChart.d.ts +2 -1
- package/dist/esm/types/src/components/widgets/PerformanceChart/PerformanceTable.d.ts +2 -1
- package/package.json +1 -1
- package/src/components/ui/ChartAreaInteractive/AGENT.md +0 -4
- package/src/components/ui/Chat/ChatChrome/ChatChrome.tsx +5 -2
- package/src/components/ui/DropdownMenu/DropdownMenu.styl +4 -1
- package/src/components/ui/PanelResizeHandle/PanelResizeHandle.tsx +89 -0
- package/src/components/ui/Sidebar/Sidebar.styl +23 -625
- package/src/components/ui/Sidebar/Sidebar.styl.d.ts +0 -33
- package/src/components/ui/Sidebar/Sidebar.tsx +25 -1157
- package/src/components/ui/Sidebar/Sidebar.types.ts +46 -0
- package/src/components/ui/Sidebar/SidebarAside.tsx +92 -0
- package/src/components/ui/Sidebar/SidebarContent/SidebarContent.styl +27 -0
- package/src/components/ui/Sidebar/SidebarContent/SidebarContent.styl.d.ts +7 -0
- package/src/components/ui/Sidebar/SidebarContent/SidebarContent.tsx +29 -0
- package/src/components/ui/Sidebar/SidebarFooter/SidebarFooter.styl +7 -0
- package/src/components/ui/Sidebar/SidebarFooter/SidebarFooter.styl.d.ts +7 -0
- package/src/components/ui/Sidebar/SidebarFooter/SidebarFooter.tsx +15 -0
- package/src/components/ui/Sidebar/SidebarGroup/SidebarGroup.styl +10 -0
- package/src/components/ui/Sidebar/SidebarGroup/SidebarGroup.styl.d.ts +7 -0
- package/src/components/ui/Sidebar/SidebarGroup/SidebarGroup.tsx +15 -0
- package/src/components/ui/Sidebar/SidebarGroupAction/SidebarGroupAction.styl +34 -0
- package/src/components/ui/Sidebar/SidebarGroupAction/SidebarGroupAction.styl.d.ts +7 -0
- package/src/components/ui/Sidebar/SidebarGroupAction/SidebarGroupAction.tsx +23 -0
- package/src/components/ui/Sidebar/SidebarMenu/SidebarMenu.styl +60 -0
- package/src/components/ui/Sidebar/SidebarMenu/SidebarMenu.styl.d.ts +12 -0
- package/src/components/ui/Sidebar/SidebarMenu/SidebarMenu.tsx +40 -0
- package/src/components/ui/Sidebar/SidebarMenuAction/SidebarMenuAction.styl +73 -0
- package/src/components/ui/Sidebar/SidebarMenuAction/SidebarMenuAction.styl.d.ts +8 -0
- package/src/components/ui/Sidebar/SidebarMenuAction/SidebarMenuAction.tsx +31 -0
- package/src/components/ui/Sidebar/SidebarMenuButton/SidebarMenuButton.styl +107 -0
- package/src/components/ui/Sidebar/SidebarMenuButton/SidebarMenuButton.styl.d.ts +15 -0
- package/src/components/ui/Sidebar/SidebarMenuButton/SidebarMenuButton.tsx +82 -0
- package/src/components/ui/Sidebar/SidebarMenuSub/SidebarMenuSub.styl +39 -0
- package/src/components/ui/Sidebar/SidebarMenuSub/SidebarMenuSub.styl.d.ts +8 -0
- package/src/components/ui/Sidebar/SidebarMenuSub/SidebarMenuSub.tsx +29 -0
- package/src/components/ui/Sidebar/SidebarMenuSubButton/SidebarMenuSubButton.styl +71 -0
- package/src/components/ui/Sidebar/SidebarMenuSubButton/SidebarMenuSubButton.styl.d.ts +8 -0
- package/src/components/ui/Sidebar/SidebarMenuSubButton/SidebarMenuSubButton.tsx +80 -0
- package/src/components/ui/Sidebar/SidebarProvider/SidebarProvider.styl +45 -0
- package/src/components/ui/Sidebar/SidebarProvider/SidebarProvider.styl.d.ts +9 -0
- package/src/components/ui/Sidebar/SidebarProvider/SidebarProvider.tsx +447 -0
- package/src/components/ui/Sidebar/SidebarRail/SidebarRail.styl +42 -0
- package/src/components/ui/Sidebar/SidebarRail/SidebarRail.styl.d.ts +7 -0
- package/src/components/ui/Sidebar/SidebarRail/SidebarRail.tsx +22 -0
- package/src/components/ui/Sidebar/SidebarResizeHandle/SidebarResizeHandle.styl +37 -0
- package/src/components/ui/Sidebar/SidebarResizeHandle/SidebarResizeHandle.styl.d.ts +7 -0
- package/src/components/ui/Sidebar/SidebarResizeHandle/SidebarResizeHandle.tsx +54 -0
- package/src/components/ui/Sidebar/SidebarSeparator/SidebarSeparator.styl +7 -0
- package/src/components/ui/Sidebar/SidebarSeparator/SidebarSeparator.styl.d.ts +7 -0
- package/src/components/ui/Sidebar/SidebarSeparator/SidebarSeparator.tsx +20 -0
- package/src/components/ui/Sidebar/SidebarTrigger/SidebarTrigger.styl +11 -0
- package/src/components/ui/Sidebar/SidebarTrigger/SidebarTrigger.styl.d.ts +7 -0
- package/src/components/ui/Sidebar/SidebarTrigger/SidebarTrigger.tsx +34 -0
- package/src/components/ui/Sidebar/sidebarConstants.ts +6 -0
- package/src/components/ui/Sidebar/sidebarContext.tsx +46 -0
- package/src/components/ui/Sidebar/sidebarUtils.ts +47 -0
- package/src/components/widgets/DriverMap/AGENT.md +0 -4
- package/src/components/widgets/DriverMap/DriverMap.tsx +11 -10
- package/src/components/widgets/DriversComparisonChart/AGENT.md +0 -4
- package/src/components/widgets/PerformanceChart/AGENT.md +0 -4
- package/src/components/widgets/PerformanceChart/PerformanceChart.tsx +3 -0
- package/src/components/widgets/PerformanceChart/PerformanceTable.tsx +3 -1
- package/src/components/widgets/SidebarDatasetsItemsGrouped/AGENT.md +28 -11
- package/src/docs/components/DocsGuidance/DocsGuidance.styl +1 -0
- package/dist/esm/components/ui/Sidebar/Sidebar.js +0 -542
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styleInject from 'style-inject';
|
|
2
2
|
|
|
3
|
-
var css_248z = "@media (max-width:768px){:root{--page-x-padding:var(--p-6);--page-y-padding:var(--p-6)}}.Sidebar_sidebarWrapper__DGm4P{align-items:stretch;display:flex;flex-direction:row;height:100%;min-height:0;width:100%}.Sidebar_sidebarWrapper__DGm4P #page-sidebar-actions{min-height:100%}@media (max-width:768px){.Sidebar_sidebarWrapper__DGm4P{flex-direction:column;height:100dvh;max-height:100dvh}}.Sidebar_sidebarMainShell__pSWDC{display:flex;flex:1;flex-direction:column;min-height:0;min-width:0}.Sidebar_chatPanelMount__1Zctx{background:var(--background);border-left:1px solid var(--border);flex:0 0 0px;flex:0 0 var(--chat-panel-width,0px);min-height:0;min-width:0;overflow:hidden;width:0;width:var(--chat-panel-width,0)}@media (max-width:768px){.Sidebar_chatPanelMount__1Zctx{border-left:none;border-top:1px solid var(--border);flex:0 0 0px;flex:0 0 var(--chat-panel-height,0px);height:0;height:var(--chat-panel-height,0);transition:flex-basis .2s ease,height .2s ease;width:100%}}.Sidebar_sidebar__0vqNZ{height:0;position:fixed;--top-offset:-10px;--gap-top:calc(var(--header-height) + var(--top-offset));align-self:flex-start;color:var(--sidebar-foreground);display:none;flex-direction:column;top:calc(var(--gap-top));top:calc(var(--gap-top) + var(--app-banner-height, 0px));width:var(--sidebar-width)}@media (min-width:768px){.Sidebar_sidebar__0vqNZ[data-state=expanded]{display:flex;height:calc(100vh - var(--gap-top));height:calc(100vh - var(--gap-top) - var(--app-banner-height, 0px));min-height:0}}.Sidebar_sidebar__0vqNZ[data-collapsible=offcanvas]{overflow:hidden;padding:0;width:0}.Sidebar_sidebarTrigger__ipx2C{cursor:pointer;margin-left:calc(var(--p-4)*-1);width:var(--p-5)}.Sidebar_sidebarTrigger__ipx2C svg{height:20px;width:20px}.Sidebar_sidebarRail__uvSpl{position:absolute;inset-y:0;display:hidden;transition:all ease-out;width:1rem;z-index:20}.Sidebar_sidebarRail__uvSpl:hover:after{background-color:var(--sidebar-border)}.Sidebar_sidebarRail__uvSpl[data-side=left]{right:-1rem}.Sidebar_sidebarRail__uvSpl[data-side=right]{left:0}.Sidebar_sidebarRail__uvSpl:after{content:\"\";position:absolute;inset-y:0;left:50%;width:2px}@media (min-width:640px){.Sidebar_sidebarRail__uvSpl{display:flex}}.Sidebar_sidebarRail__uvSpl[data-side=left]{cursor:w-resize}.Sidebar_sidebarRail__uvSpl[data-side=left][data-state=collapsed],.Sidebar_sidebarRail__uvSpl[data-side=right]{cursor:e-resize}.Sidebar_sidebarRail__uvSpl[data-side=right][data-state=collapsed]{cursor:w-resize}.Sidebar_sidebarRail__uvSpl[data-collapsible=offcanvas]{transform:translateX(0)}.Sidebar_sidebarRail__uvSpl[data-collapsible=offcanvas]:hover{background-color:var(--sidebar)}.Sidebar_sidebarRail__uvSpl[data-collapsible=offcanvas]:after{left:100%}.Sidebar_sidebarRail__uvSpl[data-side=left][data-collapsible=offcanvas]{right:-.5rem}.Sidebar_sidebarRail__uvSpl[data-side=right][data-collapsible=offcanvas]{left:-.5rem}.Sidebar_sidebarResizeHandle__kuD6t{background-color:transparent;background-color:var(--page-color);border-radius:2.5px;height:calc(100vh + 200px);height:calc(100vh + 200px - var(--app-banner-height, 0px));opacity:0;position:absolute;top:-200px;touch-action:none;transition:opacity .15s ease-out;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:5px;z-index:30}.Sidebar_sidebarResizeHandle__kuD6t:before{content:\"\";cursor:col-resize;height:100%;position:absolute;right:0;width:30px}.Sidebar_sidebarResizeHandle__kuD6t[data-side=left]{right:2px}.Sidebar_sidebarResizeHandle__kuD6t[data-side=right]{left:0}.Sidebar_sidebarResizeHandle__kuD6t:hover{opacity:1}.Sidebar_sidebarResizeHandle__kuD6t:active{opacity:0}.Sidebar_fullHeightResizer__jZXnw .Sidebar_sidebarResizeHandle__kuD6t{height:calc(100vh - var(--gap-top)*-1);height:calc(100vh - var(--gap-top)*-1 - var(--app-banner-height, 0px));top:-80px}.Sidebar_sidebarInput__ujQLX{background-color:var(--background);box-shadow:none;height:2rem;width:100%}.Sidebar_sidebarFooter__V3O-l,.Sidebar_sidebarHeader__X33ii{display:flex;flex-direction:column;gap:0;padding:0}.Sidebar_sidebarSeparator__oUkYG{background-color:var(--sidebar-border);margin-left:0;margin-right:0;width:auto}.Sidebar_sidebarContent__Ywe1o{display:flex;flex:1;flex-direction:column;gap:var(--p-16);height:100vh;max-height:100%;min-height:0;overflow:auto;position:absolute;width:100%}@media (min-width:768px){.Sidebar_sidebarContent__Ywe1o{height:calc(100vh - var(--gap-top));height:calc(100vh - var(--gap-top) - var(--app-banner-height, 0px))}}.Sidebar_sidebarContent__Ywe1o[data-collapsible=icon]{overflow:hidden}.Sidebar_sidebarGroup__7Mhg2{display:flex;flex-direction:column;min-width:0;padding:40px 0 0;position:relative;width:100%}.Sidebar_sidebarGroupAction__OhVZq{align-items:center;aspect-ratio:1;border-radius:.375rem;color:var(--sidebar-foreground);display:flex;justify-content:center;outline:none;padding:0;position:absolute;right:.75rem;top:.875rem;transition:transform;width:1.25rem}.Sidebar_sidebarGroupAction__OhVZq:hover{background-color:var(--sidebar-accent);color:var(--sidebar-accent-foreground)}.Sidebar_sidebarGroupAction__OhVZq:focus-visible{box-shadow:0 0 0 2px var(--sidebar-ring)}.Sidebar_sidebarGroupAction__OhVZq>svg{flex-shrink:0;height:1rem;width:1rem}.Sidebar_sidebarGroupAction__OhVZq:after{content:\"\";inset:-.5rem;position:absolute}@media (min-width:768px){.Sidebar_sidebarGroupAction__OhVZq:after{display:none}}.Sidebar_sidebarGroupAction__OhVZq[data-collapsible=icon]{display:none}.Sidebar_sidebarMenu__hYXIo{display:flex;flex-direction:column;gap:var(--p-4);list-style:none;min-width:0;padding:0 var(--p-11) var(--p-10) var(--p-8);width:100%}@media (max-width:768px){.Sidebar_sidebarMenu__hYXIo{padding-right:var(--p-8)}}.Sidebar_sidebarMenuItem__CRhM8{cursor:pointer;position:relative}.Sidebar_sidebarMenuBadge__ttvCR{align-items:center;border-radius:.375rem;color:var(--sidebar-foreground);display:flex;font-weight:500;height:1.25rem;justify-content:center;min-width:1.25rem;padding-left:.25rem;padding-right:.25rem;pointer-events:none;position:absolute;right:.25rem;-webkit-user-select:none;-moz-user-select:none;user-select:none}.Sidebar_sidebarMenuBadge__ttvCR[data-size=sm]{top:.25rem}.Sidebar_sidebarMenuBadge__ttvCR[data-size=md]{top:.375rem}.Sidebar_sidebarMenuBadge__ttvCR[data-size=lg]{top:.625rem}.Sidebar_sidebarMenuBadge__ttvCR[data-collapsible=icon]{display:none}.Sidebar_sidebarMenuSkeleton__u2KoI{align-items:center;border-radius:.375rem;display:flex;gap:.5rem;height:2rem;padding-left:.5rem;padding-right:.5rem}.Sidebar_sidebarMenuSkeletonIcon__-1tvv{border-radius:.375rem;height:1rem;width:1rem}.Sidebar_sidebarMenuSkeletonText__dWzWo{flex:1;height:1rem;max-width:var(--skeleton-width)}.Sidebar_sidebarMenuSub__gh8Rn{border-color:var(--sidebar-border);border-left:none;display:flex;flex-direction:column;gap:var(--p-1);list-style:none;margin-left:0;margin-right:0;min-width:0;padding:0;padding-top:var(--p-1);position:relative;transform:translateX(1px)}.Sidebar_sidebarMenuSub__gh8Rn:before{background:var(--sidebar-border);bottom:0;content:\"\";left:var(--p-5);pointer-events:none;position:absolute;top:0;width:1px}.Sidebar_sidebarMenuSub__gh8Rn[data-collapsible=icon]{display:none}.Sidebar_sidebarMenuSubItem__fTHJa{margin-left:var(--p-4);min-width:0;position:relative}.Sidebar_sidebarMenuSubItem__fTHJa a:hover{text-decoration:none}.Sidebar_sheetContentSidebar__cM2h2{color:var(--sidebar-foreground);padding:0;width:var(--sidebar-width)}.Sidebar_sheetContentSidebar__cM2h2>button{display:none}@media (max-width:768px){.Sidebar_sheetContentSidebar__cM2h2{z-index:100}}.Sidebar_sheetSidebarLogo__eGVDC{flex-shrink:0;padding:var(--p-6) var(--p-8) var(--p-2);position:relative}.Sidebar_sheetSidebarInner__U-SMQ{background-color:var(--sidebar);display:flex;flex-direction:column;height:100%;width:100%}.Sidebar_sheetSidebarInner__U-SMQ .Sidebar_sidebarContent__Ywe1o{flex:1;height:auto;max-height:none;min-height:0;position:relative}.Sidebar_sidebarNone__crRsF{color:var(--sidebar-foreground);display:flex;flex-direction:column;height:100%;width:var(--sidebar-width)}.Sidebar_variant-floating__-qvkJ{padding:.5rem}.Sidebar_variant-floating__-qvkJ[data-collapsible=icon],.Sidebar_variant-inset__oTfrV[data-collapsible=icon]{width:calc(var(--sidebar-width-icon) + 1rem + 2px)}.Sidebar_variant-sidebar__fAe77[data-collapsible=icon]{width:var(--sidebar-width-icon)}.Sidebar_variant-sidebar__fAe77[data-side=left]{border-right:1px solid #e5e7eb}.Sidebar_variant-sidebar__fAe77[data-side=right]{border-left:1px solid #e5e7eb}.Sidebar_sidebarMenuButton__vIEh->span,.Sidebar_sidebarMenuSubButton__c9flh>span{min-width:0;text-transform:capitalize}.Sidebar_sidebarMenuButton__vIEh->span:first-child,.Sidebar_sidebarMenuSubButton__c9flh>span:first-child{flex-grow:1}.Sidebar_sidebarMenuButton__vIEh-{align-items:center;border-radius:var(--p-3);color:var(--sidebar-foreground);cursor:pointer;display:flex;gap:var(--p-2);justify-content:flex-start;outline:none;overflow:hidden;padding:var(--p-6) var(--p-3);text-align:left;text-decoration:none;transition:all;width:100%}.Sidebar_sidebarMenuButton__vIEh-:visited{color:var(--sidebar-foreground)}.Sidebar_sidebarMenuButton__vIEh-:hover{text-decoration:none}.Sidebar_sidebarMenuSubItem__fTHJa:active .Sidebar_sidebarMenuButton__vIEh-,.Sidebar_sidebarMenuSubItem__fTHJa:hover .Sidebar_sidebarMenuButton__vIEh-,.Sidebar_sidebarMenuSubItem__fTHJa[data-state=open] .Sidebar_sidebarMenuButton__vIEh-{background-color:var(--sidebar-accent);color:var(--sidebar-accent-foreground)}.Sidebar_sidebarMenuButton__vIEh-:focus-visible{box-shadow:0 0 0 2px var(--sidebar-ring)}.Sidebar_sidebarMenuButton__vIEh-:disabled,.Sidebar_sidebarMenuButton__vIEh-[aria-disabled=true]{opacity:.5;pointer-events:none}.Sidebar_sidebarMenuButton__vIEh-[data-active=true]{background-color:var(--sidebar-accent);color:var(--sidebar-accent-foreground);font-weight:500}.Sidebar_sidebarMenuButton__vIEh-[data-collapsible=icon]{height:2rem!important;padding:.5rem!important;width:2rem!important}.Sidebar_sidebarMenuButton__vIEh->svg{flex-shrink:0;height:var(--p-5);width:var(--p-5)}.Sidebar_sidebarMenuButton__vIEh-.Sidebar_size-sm__7aIbu{height:1.75rem}.Sidebar_sidebarMenuButton__vIEh-.Sidebar_size-md__rcjmO{height:var(--p-12)}.Sidebar_sidebarMenuButton__vIEh-.Sidebar_size-lg__1k76S{height:3rem}.Sidebar_sidebarMenuButton__vIEh-.Sidebar_size-lg__1k76S[data-collapsible=icon]{padding:0!important}.Sidebar_sidebarMenuButton__vIEh-.Sidebar_variant-outline__UmtAz{background-color:var(--background);box-shadow:0 0 0 1px var(--sidebar-border)}.Sidebar_sidebarMenuButton__vIEh-.Sidebar_variant-outline__UmtAz:hover{background-color:var(--sidebar-accent);box-shadow:0 0 0 1px var(--sidebar-accent);color:var(--sidebar-accent-foreground)}.Sidebar_sidebarMenuButtonLabel__ropmN{flex-grow:1}.Sidebar_sidebarMenuSubButtonLabel__L23CG{flex-grow:1;min-width:0}.Sidebar_sidebarMenuButtonChevron__IPWNA{align-items:center;display:flex;flex-shrink:0;margin-left:auto;opacity:.5;transition:transform .1s ease-out}.Sidebar_sidebarMenuButton__vIEh-:hover .Sidebar_sidebarMenuButtonChevron__IPWNA{opacity:1}.Sidebar_sidebarMenuButtonChevron__IPWNA.Sidebar_expanded__iPddE{transform:rotate(90deg)}.Sidebar_sidebarMenuButtonChevron__IPWNA>svg{height:var(--p-5);width:var(--p-5)}.Sidebar_sidebarMenuButtonCta__dQAhv{display:flex;justify-content:flex-start;text-align:left;width:100%}.Sidebar_sidebarMenuButtonCta__dQAhv>svg{flex-shrink:0;height:var(--p-5);width:var(--p-5)}.Sidebar_sidebarMenuAction__mFZa1{align-items:center;aspect-ratio:1;border-radius:.375rem;color:var(--sidebar-foreground);cursor:pointer;display:flex;justify-content:center;opacity:0;outline:none;padding:0;position:absolute;right:var(--p-2);top:var(--p-2);transition:transform;width:1.25rem}.Sidebar_sidebarMenuAction__mFZa1:before{background-image:linear-gradient(to left,var(--sidebar-accent) 70%,transparent 100%);content:\"\";height:100%;pointer-events:none;position:absolute;right:0;transition:opacity .2s ease-in-out;width:calc(100% + var(--p-4))}.Sidebar_sidebarMenuSubItem__fTHJa:hover .Sidebar_sidebarMenuAction__mFZa1{opacity:1}.Sidebar_sidebarMenuAction__mFZa1:focus-visible{box-shadow:0 0 0 2px var(--sidebar-ring)}.Sidebar_sidebarMenuAction__mFZa1>svg{flex-shrink:0;height:1rem;opacity:.5;pointer-events:none;transition:opacity .2s ease-in-out;width:1rem;z-index:1}.Sidebar_sidebarMenuAction__mFZa1:hover>svg{opacity:1}.Sidebar_sidebarMenuAction__mFZa1:after{content:\"\";inset:-.5rem;position:absolute}@media (min-width:768px){.Sidebar_sidebarMenuAction__mFZa1:after{display:none}}.Sidebar_sidebarMenuAction__mFZa1[data-size=sm]{top:.25rem}.Sidebar_sidebarMenuAction__mFZa1[data-size=md]{top:.375rem}.Sidebar_sidebarMenuAction__mFZa1[data-size=lg]{top:.625rem}.Sidebar_sidebarMenuAction__mFZa1[data-collapsible=icon]{display:none}.Sidebar_sidebarMenuAction__mFZa1.Sidebar_showOnHover__itXsA[data-active=true]{color:var(--sidebar-accent-foreground)}.Sidebar_sidebarMenuAction__mFZa1.Sidebar_showOnHover__itXsA[data-state=open]{opacity:1}@media (min-width:768px){.Sidebar_sidebarMenuAction__mFZa1.Sidebar_showOnHover__itXsA{opacity:0}.Sidebar_sidebarMenuAction__mFZa1.Sidebar_showOnHover__itXsA:focus-within,.Sidebar_sidebarMenuAction__mFZa1.Sidebar_showOnHover__itXsA:hover{opacity:1}}.Sidebar_sidebarMenuSubButton__c9flh{align-items:center;border-radius:var(--p-3);color:var(--sidebar-foreground);cursor:pointer;display:flex;gap:var(--p-1);height:var(--p-9);margin-left:var(--p-3);min-width:0;outline:none;overflow:hidden;padding:var(--p-2) var(--p-3);text-decoration:none;transform:translateX(-1px);width:calc(100% - var(--p-3))}.Sidebar_sidebarMenuSubButton__c9flh:visited{color:var(--sidebar-foreground)}.Sidebar_sidebarMenuSubButton__c9flh:hover{text-decoration:none}.Sidebar_sidebarMenuSubItem__fTHJa:active .Sidebar_sidebarMenuSubButton__c9flh,.Sidebar_sidebarMenuSubItem__fTHJa:hover .Sidebar_sidebarMenuSubButton__c9flh{background-color:var(--sidebar-accent);color:var(--sidebar-accent-foreground)}.Sidebar_sidebarMenuSubButton__c9flh:focus-visible{box-shadow:0 0 0 2px var(--sidebar-ring)}.Sidebar_sidebarMenuSubButton__c9flh:disabled,.Sidebar_sidebarMenuSubButton__c9flh[aria-disabled=true]{opacity:.5;pointer-events:none}.Sidebar_sidebarMenuSubButton__c9flh[data-active=true]{background-color:var(--sidebar-accent);color:var(--sidebar-accent-foreground)}.Sidebar_sidebarMenuSubButton__c9flh[data-active=true]:visited{color:var(--sidebar-accent-foreground)}.Sidebar_sidebarMenuSubButton__c9flh[data-collapsible=icon]{display:none}.Sidebar_sidebarMenuSubButton__c9flh>svg{color:var(--sidebar-accent-foreground);flex-shrink:0;height:1rem;width:1rem}::view-transition-old(sidebar-container),::view-transition-old(sidebar-gap){animation-duration:.2s;animation-name:Sidebar_sidebarVtOld__hlKqn;animation-timing-function:ease-out;transform:translateZ(0)}::view-transition-new(sidebar-container),::view-transition-new(sidebar-gap){animation-duration:.2s;animation-name:Sidebar_sidebarVtNew__FFhYU;animation-timing-function:ease-out;transform:translateZ(0)}@keyframes Sidebar_sidebarVtOld__hlKqn{0%{opacity:1}to{opacity:0}}@keyframes Sidebar_sidebarVtNew__FFhYU{0%{opacity:0}to{opacity:1}}";
|
|
4
|
-
var
|
|
3
|
+
var css_248z = "@media (max-width:768px){:root{--page-x-padding:var(--p-6);--page-y-padding:var(--p-6)}}.Sidebar_sidebarInput__ujQLX{background-color:var(--background);box-shadow:none;height:2rem;width:100%}.Sidebar_sidebarHeader__X33ii{display:flex;flex-direction:column;gap:0;padding:0}.Sidebar_sidebar__0vqNZ{height:0;position:fixed;--top-offset:-10px;--gap-top:calc(var(--header-height) + var(--top-offset));align-self:flex-start;color:var(--sidebar-foreground);display:none;flex-direction:column;top:calc(var(--gap-top));top:calc(var(--gap-top) + var(--app-banner-height, 0px));width:var(--sidebar-width)}@media (min-width:768px){.Sidebar_sidebar__0vqNZ[data-state=expanded]{display:flex;height:calc(100vh - var(--gap-top));height:calc(100vh - var(--gap-top) - var(--app-banner-height, 0px));min-height:0}}.Sidebar_sidebar__0vqNZ[data-collapsible=offcanvas]{overflow:hidden;padding:0;width:0}.Sidebar_variant-floating__-qvkJ{padding:.5rem}.Sidebar_variant-floating__-qvkJ[data-collapsible=icon],.Sidebar_variant-inset__oTfrV[data-collapsible=icon]{width:calc(var(--sidebar-width-icon) + 1rem + 2px)}.Sidebar_variant-sidebar__fAe77[data-collapsible=icon]{width:var(--sidebar-width-icon)}.Sidebar_variant-sidebar__fAe77[data-side=left]{border-right:1px solid #e5e7eb}.Sidebar_variant-sidebar__fAe77[data-side=right]{border-left:1px solid #e5e7eb}.Sidebar_sheetContentSidebar__cM2h2{color:var(--sidebar-foreground);padding:0;width:var(--sidebar-width)}.Sidebar_sheetContentSidebar__cM2h2>button{display:none}@media (max-width:768px){.Sidebar_sheetContentSidebar__cM2h2{z-index:100}}.Sidebar_sheetSidebarLogo__eGVDC{flex-shrink:0;padding:var(--p-6) var(--p-8) var(--p-2);position:relative}.Sidebar_sheetSidebarInner__U-SMQ{background-color:var(--sidebar);display:flex;flex-direction:column;height:100%;width:100%}.Sidebar_sidebarNone__crRsF{color:var(--sidebar-foreground);display:flex;flex-direction:column;height:100%;width:var(--sidebar-width)}::view-transition-old(sidebar-container),::view-transition-old(sidebar-gap){animation-duration:.2s;animation-name:Sidebar_sidebarVtOld__hlKqn;animation-timing-function:ease-out;transform:translateZ(0)}::view-transition-new(sidebar-container),::view-transition-new(sidebar-gap){animation-duration:.2s;animation-name:Sidebar_sidebarVtNew__FFhYU;animation-timing-function:ease-out;transform:translateZ(0)}@keyframes Sidebar_sidebarVtOld__hlKqn{0%{opacity:1}to{opacity:0}}@keyframes Sidebar_sidebarVtNew__FFhYU{0%{opacity:0}to{opacity:1}}";
|
|
4
|
+
var S = {"sidebarInput":"Sidebar_sidebarInput__ujQLX","sidebarHeader":"Sidebar_sidebarHeader__X33ii","sidebar":"Sidebar_sidebar__0vqNZ","variant-floating":"Sidebar_variant-floating__-qvkJ","variant-inset":"Sidebar_variant-inset__oTfrV","variant-sidebar":"Sidebar_variant-sidebar__fAe77","sheetContentSidebar":"Sidebar_sheetContentSidebar__cM2h2","sheetSidebarLogo":"Sidebar_sheetSidebarLogo__eGVDC","sheetSidebarInner":"Sidebar_sheetSidebarInner__U-SMQ","sidebarNone":"Sidebar_sidebarNone__crRsF","sidebarVtOld":"Sidebar_sidebarVtOld__hlKqn","sidebarVtNew":"Sidebar_sidebarVtNew__FFhYU"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
7
|
-
export {
|
|
7
|
+
export { S as default };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { useRef, useEffect } from 'react';
|
|
3
|
+
import { Sheet, SheetContent } from '../Sheet/Sheet.js';
|
|
4
|
+
import { useSidebarState, useSidebarActions } from './sidebarContext.js';
|
|
5
|
+
import { Logo } from '../Logo/Logo.js';
|
|
6
|
+
import S from './Sidebar.styl.js';
|
|
7
|
+
import { SIDEBAR_WIDTH_MOBILE } from './sidebarConstants.js';
|
|
8
|
+
import { SidebarResizeHandle } from './SidebarResizeHandle/SidebarResizeHandle.js';
|
|
9
|
+
import cn from 'classnames';
|
|
10
|
+
import { useIsSidebarSheetLayout } from '../../../hooks/useIsSidebarSheetLayout.js';
|
|
11
|
+
|
|
12
|
+
function Sidebar({ defaultOpen = true, open: openProp, onOpenChange: setOpenProp, className, side = 'left', variant = 'sidebar', collapsible = 'offcanvas', children, fullHeightResizer = false, brandText = 'Sybilion', ...props }) {
|
|
13
|
+
const isSidebarSheetLayout = useIsSidebarSheetLayout();
|
|
14
|
+
const { isOpen } = useSidebarState();
|
|
15
|
+
const { setOpen } = useSidebarActions();
|
|
16
|
+
const prevSheetLayoutRef = useRef(isSidebarSheetLayout);
|
|
17
|
+
/** Narrow shell: sidebar is a sheet; collapse only when crossing into this mode. */
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
const enteredSheetLayout = isSidebarSheetLayout && !prevSheetLayoutRef.current;
|
|
20
|
+
prevSheetLayoutRef.current = isSidebarSheetLayout;
|
|
21
|
+
if (enteredSheetLayout)
|
|
22
|
+
setOpen(false);
|
|
23
|
+
}, [isSidebarSheetLayout, setOpen]);
|
|
24
|
+
if (collapsible === 'none') {
|
|
25
|
+
return (jsx("div", { "data-slot": "sidebar", className: cn(S.sidebarNone, className), ...props, children: children }));
|
|
26
|
+
}
|
|
27
|
+
if (isSidebarSheetLayout) {
|
|
28
|
+
return (jsx(Sheet, { open: isOpen, onOpenChange: setOpen, ...props, children: jsx(SheetContent, { "data-sidebar": "sidebar", "data-slot": "sidebar", className: cn(S.sheetContentSidebar, className), style: {
|
|
29
|
+
'--gap-top': '40px',
|
|
30
|
+
'--sidebar-width': SIDEBAR_WIDTH_MOBILE,
|
|
31
|
+
}, side: side, children: jsxs("div", { className: cn(S.sheetSidebarInner), "data-sheet-sidebar-inner": "", children: [jsx("div", { className: S.sheetSidebarLogo, children: jsx(Logo, { size: "md", brandText: brandText }) }), children] }) }) }));
|
|
32
|
+
}
|
|
33
|
+
return (jsxs("aside", { className: cn(S.sidebar, S[`variant-${variant}`], className), "data-full-height-resizer": fullHeightResizer ? '' : undefined, "data-state": isOpen ? 'expanded' : 'collapsed', "data-collapsible": !isOpen ? collapsible : '', "data-variant": variant, "data-side": side, ...props, children: [children, jsx(SidebarResizeHandle, { side: side })] }));
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export { Sidebar };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import { Scroll } from '@homecode/ui';
|
|
4
|
+
import S from './SidebarContent.styl.js';
|
|
5
|
+
|
|
6
|
+
function SidebarContent({ className, innerClassName, children, }) {
|
|
7
|
+
// const sidebarContentTransition = useViewTransition({
|
|
8
|
+
// transitionName: 'sidebar-content',
|
|
9
|
+
// });
|
|
10
|
+
return (jsx(Scroll, { y: true, autoHide: true, fadeSize: "l", offset: { y: { before: 40, after: 20 } }, className: cn(S.sidebarContent, className), innerClassName: innerClassName, children: children }));
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { SidebarContent };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import styleInject from 'style-inject';
|
|
2
|
+
|
|
3
|
+
var css_248z = "@media (max-width:768px){:root{--page-x-padding:var(--p-6);--page-y-padding:var(--p-6)}}.SidebarContent_sidebarContent__Q5EF3{display:flex;flex:1;flex-direction:column;gap:var(--p-16);height:100vh;max-height:100%;min-height:0;overflow:auto;position:absolute;width:100%}@media (min-width:768px){.SidebarContent_sidebarContent__Q5EF3{height:calc(100vh - var(--gap-top));height:calc(100vh - var(--gap-top) - var(--app-banner-height, 0px))}}.SidebarContent_sidebarContent__Q5EF3[data-collapsible=icon]{overflow:hidden}[data-sheet-sidebar-inner] .SidebarContent_sidebarContent__Q5EF3{flex:1;height:auto;max-height:none;min-height:0;position:relative}";
|
|
4
|
+
var S = {"sidebarContent":"SidebarContent_sidebarContent__Q5EF3"};
|
|
5
|
+
styleInject(css_248z);
|
|
6
|
+
|
|
7
|
+
export { S as default };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import S from './SidebarFooter.styl.js';
|
|
4
|
+
|
|
5
|
+
function SidebarFooter({ className, ...props }) {
|
|
6
|
+
return (jsx("div", { "data-slot": "sidebar-footer", "data-sidebar": "footer", className: cn(S.sidebarFooter, className), ...props }));
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export { SidebarFooter };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import styleInject from 'style-inject';
|
|
2
|
+
|
|
3
|
+
var css_248z = "@media (max-width:768px){:root{--page-x-padding:var(--p-6);--page-y-padding:var(--p-6)}}.SidebarFooter_sidebarFooter__IBEfk{display:flex;flex-direction:column;gap:0;padding:0}";
|
|
4
|
+
var S = {"sidebarFooter":"SidebarFooter_sidebarFooter__IBEfk"};
|
|
5
|
+
styleInject(css_248z);
|
|
6
|
+
|
|
7
|
+
export { S as default };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import S from './SidebarGroup.styl.js';
|
|
4
|
+
|
|
5
|
+
function SidebarGroup({ className, ...props }) {
|
|
6
|
+
return (jsx("div", { "data-slot": "sidebar-group", "data-sidebar": "group", className: cn(S.sidebarGroup, className), ...props }));
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export { SidebarGroup };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import styleInject from 'style-inject';
|
|
2
|
+
|
|
3
|
+
var css_248z = "@media (max-width:768px){:root{--page-x-padding:var(--p-6);--page-y-padding:var(--p-6)}}.SidebarGroup_sidebarGroup__STPzX{display:flex;flex-direction:column;min-width:0;padding:40px 0 0;position:relative;width:100%}";
|
|
4
|
+
var S = {"sidebarGroup":"SidebarGroup_sidebarGroup__STPzX"};
|
|
5
|
+
styleInject(css_248z);
|
|
6
|
+
|
|
7
|
+
export { S as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
4
|
+
import S from './SidebarGroupAction.styl.js';
|
|
5
|
+
|
|
6
|
+
function SidebarGroupAction({ className, asChild = false, ...props }) {
|
|
7
|
+
const Comp = asChild ? Slot : 'button';
|
|
8
|
+
return (jsx(Comp, { "data-slot": "sidebar-group-action", "data-sidebar": "group-action", className: cn(S.sidebarGroupAction, className), ...props }));
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export { SidebarGroupAction };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import styleInject from 'style-inject';
|
|
2
|
+
|
|
3
|
+
var css_248z = "@media (max-width:768px){:root{--page-x-padding:var(--p-6);--page-y-padding:var(--p-6)}}.SidebarGroupAction_sidebarGroupAction__2y46S{align-items:center;aspect-ratio:1;border-radius:.375rem;color:var(--sidebar-foreground);display:flex;justify-content:center;outline:none;padding:0;position:absolute;right:.75rem;top:.875rem;transition:transform;width:1.25rem}.SidebarGroupAction_sidebarGroupAction__2y46S:hover{background-color:var(--sidebar-accent);color:var(--sidebar-accent-foreground)}.SidebarGroupAction_sidebarGroupAction__2y46S:focus-visible{box-shadow:0 0 0 2px var(--sidebar-ring)}.SidebarGroupAction_sidebarGroupAction__2y46S>svg{flex-shrink:0;height:1rem;width:1rem}.SidebarGroupAction_sidebarGroupAction__2y46S:after{content:\"\";inset:-.5rem;position:absolute}@media (min-width:768px){.SidebarGroupAction_sidebarGroupAction__2y46S:after{display:none}}.SidebarGroupAction_sidebarGroupAction__2y46S[data-collapsible=icon]{display:none}";
|
|
4
|
+
var S = {"sidebarGroupAction":"SidebarGroupAction_sidebarGroupAction__2y46S"};
|
|
5
|
+
styleInject(css_248z);
|
|
6
|
+
|
|
7
|
+
export { S as default };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import S from './SidebarMenu.styl.js';
|
|
4
|
+
|
|
5
|
+
function SidebarMenu({ className, ...props }) {
|
|
6
|
+
return (jsx("ul", { "data-slot": "sidebar-menu", "data-sidebar": "menu", className: cn(S.sidebarMenu, className), ...props }));
|
|
7
|
+
}
|
|
8
|
+
function SidebarMenuItem({ className, ...props }) {
|
|
9
|
+
return (jsx("li", { "data-slot": "sidebar-menu-item", "data-sidebar": "menu-item", className: cn(S.sidebarMenuItem, className), ...props }));
|
|
10
|
+
}
|
|
11
|
+
function SidebarMenuBadge({ className, ...props }) {
|
|
12
|
+
return (jsx("div", { "data-slot": "sidebar-menu-badge", "data-sidebar": "menu-badge", className: cn(S.sidebarMenuBadge, className), ...props }));
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { SidebarMenu, SidebarMenuBadge, SidebarMenuItem };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import styleInject from 'style-inject';
|
|
2
|
+
|
|
3
|
+
var css_248z = "@media (max-width:768px){:root{--page-x-padding:var(--p-6);--page-y-padding:var(--p-6)}}.SidebarMenu_sidebarMenu__s23ie{display:flex;flex-direction:column;gap:var(--p-4);list-style:none;min-width:0;padding:0 var(--p-11) var(--p-10) var(--p-8);width:100%}@media (max-width:768px){.SidebarMenu_sidebarMenu__s23ie{padding-right:var(--p-8)}}.SidebarMenu_sidebarMenuItem__-0rjO{cursor:pointer;position:relative}.SidebarMenu_sidebarMenuBadge__3Xl-9{align-items:center;border-radius:.375rem;color:var(--sidebar-foreground);display:flex;font-weight:500;height:1.25rem;justify-content:center;min-width:1.25rem;padding-left:.25rem;padding-right:.25rem;pointer-events:none;position:absolute;right:.25rem;-webkit-user-select:none;-moz-user-select:none;user-select:none}.SidebarMenu_sidebarMenuBadge__3Xl-9[data-size=sm]{top:.25rem}.SidebarMenu_sidebarMenuBadge__3Xl-9[data-size=md]{top:.375rem}.SidebarMenu_sidebarMenuBadge__3Xl-9[data-size=lg]{top:.625rem}.SidebarMenu_sidebarMenuBadge__3Xl-9[data-collapsible=icon]{display:none}.SidebarMenu_sidebarMenuSkeleton__v8pRu{align-items:center;border-radius:.375rem;display:flex;gap:.5rem;height:2rem;padding-left:.5rem;padding-right:.5rem}.SidebarMenu_sidebarMenuSkeletonIcon__9LFRp{border-radius:.375rem;height:1rem;width:1rem}.SidebarMenu_sidebarMenuSkeletonText__cRqnl{flex:1;height:1rem;max-width:var(--skeleton-width)}";
|
|
4
|
+
var S = {"sidebarMenu":"SidebarMenu_sidebarMenu__s23ie","sidebarMenuItem":"SidebarMenu_sidebarMenuItem__-0rjO","sidebarMenuBadge":"SidebarMenu_sidebarMenuBadge__3Xl-9","sidebarMenuSkeleton":"SidebarMenu_sidebarMenuSkeleton__v8pRu","sidebarMenuSkeletonIcon":"SidebarMenu_sidebarMenuSkeletonIcon__9LFRp","sidebarMenuSkeletonText":"SidebarMenu_sidebarMenuSkeletonText__cRqnl"};
|
|
5
|
+
styleInject(css_248z);
|
|
6
|
+
|
|
7
|
+
export { S as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
4
|
+
import S from './SidebarMenuAction.styl.js';
|
|
5
|
+
|
|
6
|
+
function SidebarMenuAction({ className, asChild = false, showOnHover = false, ...props }) {
|
|
7
|
+
const Comp = asChild ? Slot : 'button';
|
|
8
|
+
return (jsx(Comp, { "data-slot": "sidebar-menu-action", "data-sidebar": "menu-action", className: cn(S.sidebarMenuAction, showOnHover && S.showOnHover, className), ...props }));
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export { SidebarMenuAction };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import styleInject from 'style-inject';
|
|
2
|
+
|
|
3
|
+
var css_248z = "@media (max-width:768px){:root{--page-x-padding:var(--p-6);--page-y-padding:var(--p-6)}}.SidebarMenuAction_sidebarMenuAction__oihEz{align-items:center;aspect-ratio:1;border-radius:.375rem;color:var(--sidebar-foreground);cursor:pointer;display:flex;justify-content:center;opacity:0;outline:none;padding:0;position:absolute;right:var(--p-2);top:var(--p-2);transition:transform;width:1.25rem}.SidebarMenuAction_sidebarMenuAction__oihEz:before{background-image:linear-gradient(to left,var(--sidebar-accent) 70%,transparent 100%);content:\"\";height:100%;pointer-events:none;position:absolute;right:0;transition:opacity .2s ease-in-out;width:calc(100% + var(--p-4))}[data-slot=sidebar-menu-sub-item]:hover .SidebarMenuAction_sidebarMenuAction__oihEz{opacity:1}.SidebarMenuAction_sidebarMenuAction__oihEz:focus-visible{box-shadow:0 0 0 2px var(--sidebar-ring)}.SidebarMenuAction_sidebarMenuAction__oihEz>svg{flex-shrink:0;height:1rem;opacity:.5;pointer-events:none;transition:opacity .2s ease-in-out;width:1rem;z-index:1}.SidebarMenuAction_sidebarMenuAction__oihEz:hover>svg{opacity:1}.SidebarMenuAction_sidebarMenuAction__oihEz:after{content:\"\";inset:-.5rem;position:absolute}@media (min-width:768px){.SidebarMenuAction_sidebarMenuAction__oihEz:after{display:none}}.SidebarMenuAction_sidebarMenuAction__oihEz[data-size=sm]{top:.25rem}.SidebarMenuAction_sidebarMenuAction__oihEz[data-size=md]{top:.375rem}.SidebarMenuAction_sidebarMenuAction__oihEz[data-size=lg]{top:.625rem}.SidebarMenuAction_sidebarMenuAction__oihEz[data-collapsible=icon]{display:none}.SidebarMenuAction_sidebarMenuAction__oihEz.SidebarMenuAction_showOnHover__ODCvI[data-active=true]{color:var(--sidebar-accent-foreground)}.SidebarMenuAction_sidebarMenuAction__oihEz.SidebarMenuAction_showOnHover__ODCvI[data-state=open]{opacity:1}@media (min-width:768px){.SidebarMenuAction_sidebarMenuAction__oihEz.SidebarMenuAction_showOnHover__ODCvI{opacity:0}.SidebarMenuAction_sidebarMenuAction__oihEz.SidebarMenuAction_showOnHover__ODCvI:focus-within,.SidebarMenuAction_sidebarMenuAction__oihEz.SidebarMenuAction_showOnHover__ODCvI:hover{opacity:1}}";
|
|
4
|
+
var S = {"sidebarMenuAction":"SidebarMenuAction_sidebarMenuAction__oihEz","showOnHover":"SidebarMenuAction_showOnHover__ODCvI"};
|
|
5
|
+
styleInject(css_248z);
|
|
6
|
+
|
|
7
|
+
export { S as default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import { Button } from '../../Button/Button.js';
|
|
4
|
+
import { SmartTextTruncate } from '../../SmartTextTruncate/SmartTextTruncate.js';
|
|
5
|
+
import { ChevronRight } from 'lucide-react';
|
|
6
|
+
import S from './SidebarMenuButton.styl.js';
|
|
7
|
+
|
|
8
|
+
function SidebarMenuButton({ asChild = false, isActive = false, hasSubItems = false, isExpanded = false, variant = 'ghost', size = 'sm', className, icon, children, addon, ...props }) {
|
|
9
|
+
const effectiveAsChild = asChild && !hasSubItems;
|
|
10
|
+
const label = (jsx(SmartTextTruncate, { className: S.sidebarMenuButtonLabel, children: children }));
|
|
11
|
+
const chevron = hasSubItems ? (jsx("span", { className: cn(S.sidebarMenuButtonChevron, isExpanded && S.expanded), "aria-hidden": "true", children: jsx(ChevronRight, { size: 16 }) })) : null;
|
|
12
|
+
const userContent = (jsxs(Fragment, { children: [label, addon] }));
|
|
13
|
+
return (jsxs(Button, { asChild: effectiveAsChild, variant: variant, size: size, "data-slot": "sidebar-menu-button", "data-sidebar": "menu-button", "data-active": isActive, "aria-expanded": hasSubItems ? isExpanded : undefined, className: cn(variant === 'default' ? S.sidebarMenuButtonCta : S.sidebarMenuButton, S[`size-${size}`], className), ...props, children: [icon, effectiveAsChild ? (userContent) : (jsxs(Fragment, { children: [userContent, chevron] }))] }));
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { SidebarMenuButton };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import styleInject from 'style-inject';
|
|
2
|
+
|
|
3
|
+
var css_248z = "@media (max-width:768px){:root{--page-x-padding:var(--p-6);--page-y-padding:var(--p-6)}}.SidebarMenuButton_sidebarMenuButton__g1Fkh>span{min-width:0;text-transform:capitalize}.SidebarMenuButton_sidebarMenuButton__g1Fkh>span:first-child{flex-grow:1}.SidebarMenuButton_sidebarMenuButton__g1Fkh{align-items:center;border-radius:var(--p-3);color:var(--sidebar-foreground);cursor:pointer;display:flex;gap:var(--p-2);justify-content:flex-start;outline:none;overflow:hidden;padding:var(--p-6) var(--p-3);text-align:left;text-decoration:none;transition:all;width:100%}.SidebarMenuButton_sidebarMenuButton__g1Fkh:visited{color:var(--sidebar-foreground)}.SidebarMenuButton_sidebarMenuButton__g1Fkh:hover{text-decoration:none}[data-slot=sidebar-menu-sub-item]:active .SidebarMenuButton_sidebarMenuButton__g1Fkh,[data-slot=sidebar-menu-sub-item]:hover .SidebarMenuButton_sidebarMenuButton__g1Fkh,[data-slot=sidebar-menu-sub-item][data-state=open] .SidebarMenuButton_sidebarMenuButton__g1Fkh{background-color:var(--sidebar-accent);color:var(--sidebar-accent-foreground)}.SidebarMenuButton_sidebarMenuButton__g1Fkh:focus-visible{box-shadow:0 0 0 2px var(--sidebar-ring)}.SidebarMenuButton_sidebarMenuButton__g1Fkh:disabled,.SidebarMenuButton_sidebarMenuButton__g1Fkh[aria-disabled=true]{opacity:.5;pointer-events:none}.SidebarMenuButton_sidebarMenuButton__g1Fkh[data-active=true]{background-color:var(--sidebar-accent);color:var(--sidebar-accent-foreground);font-weight:500}.SidebarMenuButton_sidebarMenuButton__g1Fkh[data-collapsible=icon]{height:2rem!important;padding:.5rem!important;width:2rem!important}.SidebarMenuButton_sidebarMenuButton__g1Fkh>svg{flex-shrink:0;height:var(--p-5);width:var(--p-5)}.SidebarMenuButton_sidebarMenuButton__g1Fkh.SidebarMenuButton_size-sm__YD6yK{height:1.75rem}.SidebarMenuButton_sidebarMenuButton__g1Fkh.SidebarMenuButton_size-md__fUOHz{height:var(--p-12)}.SidebarMenuButton_sidebarMenuButton__g1Fkh.SidebarMenuButton_size-lg__jDrNV{height:3rem}.SidebarMenuButton_sidebarMenuButton__g1Fkh.SidebarMenuButton_size-lg__jDrNV[data-collapsible=icon]{padding:0!important}.SidebarMenuButton_sidebarMenuButton__g1Fkh.SidebarMenuButton_variant-outline__wTMya{background-color:var(--background);box-shadow:0 0 0 1px var(--sidebar-border)}.SidebarMenuButton_sidebarMenuButton__g1Fkh.SidebarMenuButton_variant-outline__wTMya:hover{background-color:var(--sidebar-accent);box-shadow:0 0 0 1px var(--sidebar-accent);color:var(--sidebar-accent-foreground)}.SidebarMenuButton_sidebarMenuButtonLabel__NVAev{flex-grow:1}.SidebarMenuButton_sidebarMenuButtonChevron__VKLkh{align-items:center;display:flex;flex-shrink:0;margin-left:auto;opacity:.5;transition:transform .1s ease-out}.SidebarMenuButton_sidebarMenuButton__g1Fkh:hover .SidebarMenuButton_sidebarMenuButtonChevron__VKLkh{opacity:1}.SidebarMenuButton_sidebarMenuButtonChevron__VKLkh.SidebarMenuButton_expanded__TzXM8{transform:rotate(90deg)}.SidebarMenuButton_sidebarMenuButtonChevron__VKLkh>svg{height:var(--p-5);width:var(--p-5)}.SidebarMenuButton_sidebarMenuButtonCta__eCvzb{display:flex;justify-content:flex-start;text-align:left;width:100%}.SidebarMenuButton_sidebarMenuButtonCta__eCvzb>svg{flex-shrink:0;height:var(--p-5);width:var(--p-5)}";
|
|
4
|
+
var S = {"sidebarMenuButton":"SidebarMenuButton_sidebarMenuButton__g1Fkh","size-sm":"SidebarMenuButton_size-sm__YD6yK","size-md":"SidebarMenuButton_size-md__fUOHz","size-lg":"SidebarMenuButton_size-lg__jDrNV","variant-outline":"SidebarMenuButton_variant-outline__wTMya","sidebarMenuButtonLabel":"SidebarMenuButton_sidebarMenuButtonLabel__NVAev","sidebarMenuButtonChevron":"SidebarMenuButton_sidebarMenuButtonChevron__VKLkh","expanded":"SidebarMenuButton_expanded__TzXM8","sidebarMenuButtonCta":"SidebarMenuButton_sidebarMenuButtonCta__eCvzb"};
|
|
5
|
+
styleInject(css_248z);
|
|
6
|
+
|
|
7
|
+
export { S as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import S from './SidebarMenuSub.styl.js';
|
|
4
|
+
|
|
5
|
+
function SidebarMenuSub({ className, ...props }) {
|
|
6
|
+
return (jsx("ul", { "data-slot": "sidebar-menu-sub", "data-sidebar": "menu-sub", className: cn(S.sidebarMenuSub, className), ...props }));
|
|
7
|
+
}
|
|
8
|
+
function SidebarMenuSubItem({ className, ...props }) {
|
|
9
|
+
return (jsx("li", { "data-slot": "sidebar-menu-sub-item", "data-sidebar": "menu-sub-item", className: cn(S.sidebarMenuSubItem, className), ...props }));
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { SidebarMenuSub, SidebarMenuSubItem };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import styleInject from 'style-inject';
|
|
2
|
+
|
|
3
|
+
var css_248z = "@media (max-width:768px){:root{--page-x-padding:var(--p-6);--page-y-padding:var(--p-6)}}.SidebarMenuSub_sidebarMenuSub__FVd4i{border-color:var(--sidebar-border);border-left:none;display:flex;flex-direction:column;gap:var(--p-1);list-style:none;margin-left:0;margin-right:0;min-width:0;padding:0;padding-top:var(--p-1);position:relative;transform:translateX(1px)}.SidebarMenuSub_sidebarMenuSub__FVd4i:before{background:var(--sidebar-border);bottom:0;content:\"\";left:var(--p-5);pointer-events:none;position:absolute;top:0;width:1px}.SidebarMenuSub_sidebarMenuSub__FVd4i[data-collapsible=icon]{display:none}.SidebarMenuSub_sidebarMenuSubItem__sKxdU{margin-left:var(--p-4);min-width:0;position:relative}.SidebarMenuSub_sidebarMenuSubItem__sKxdU a:hover{text-decoration:none}";
|
|
4
|
+
var S = {"sidebarMenuSub":"SidebarMenuSub_sidebarMenuSub__FVd4i","sidebarMenuSubItem":"SidebarMenuSub_sidebarMenuSubItem__sKxdU"};
|
|
5
|
+
styleInject(css_248z);
|
|
6
|
+
|
|
7
|
+
export { S as default };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import { SmartTextTruncate } from '../../SmartTextTruncate/SmartTextTruncate.js';
|
|
4
|
+
import { Tooltip, TooltipTrigger, TooltipContent } from '../../Tooltip/Tooltip.js';
|
|
5
|
+
import { useIsSidebarSheetLayout } from '../../../../hooks/useIsSidebarSheetLayout.js';
|
|
6
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
7
|
+
import S from './SidebarMenuSubButton.styl.js';
|
|
8
|
+
import { useSidebarState, useSidebarActions } from '../sidebarContext.js';
|
|
9
|
+
|
|
10
|
+
function SidebarMenuSubButton({ asChild = false, size = 'md', isActive = false, tooltip, className, onClick, children, addon, ...props }) {
|
|
11
|
+
const Comp = asChild ? Slot : 'a';
|
|
12
|
+
const { isOpen } = useSidebarState();
|
|
13
|
+
const { setOpen } = useSidebarActions();
|
|
14
|
+
const isSidebarSheetLayout = useIsSidebarSheetLayout();
|
|
15
|
+
const handleClick = (event) => {
|
|
16
|
+
if (isSidebarSheetLayout && isOpen)
|
|
17
|
+
setOpen(false);
|
|
18
|
+
onClick?.(event);
|
|
19
|
+
};
|
|
20
|
+
const button = (jsxs(Comp, { "data-slot": "sidebar-menu-sub-button", "data-sidebar": "menu-sub-button", "data-size": size, "data-active": isActive, className: cn(S.sidebarMenuSubButton, S[`size-${size}`], className), onClick: handleClick, ...props, children: [jsx(SmartTextTruncate, { className: S.sidebarMenuSubButtonLabel, children: children }), addon] }));
|
|
21
|
+
if (!tooltip)
|
|
22
|
+
return button;
|
|
23
|
+
let tooltipProps = tooltip;
|
|
24
|
+
if (typeof tooltipProps === 'string') {
|
|
25
|
+
tooltipProps = {
|
|
26
|
+
children: tooltipProps,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
return (jsxs(Tooltip, { children: [jsx(TooltipTrigger, { asChild: true, children: button }), jsx(TooltipContent, { side: "right", align: "center", hidden: !isOpen || isSidebarSheetLayout, ...tooltipProps })] }));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export { SidebarMenuSubButton };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import styleInject from 'style-inject';
|
|
2
|
+
|
|
3
|
+
var css_248z = "@media (max-width:768px){:root{--page-x-padding:var(--p-6);--page-y-padding:var(--p-6)}}.SidebarMenuSubButton_sidebarMenuSubButton__Zs-sX>span{min-width:0;text-transform:capitalize}.SidebarMenuSubButton_sidebarMenuSubButton__Zs-sX>span:first-child{flex-grow:1}.SidebarMenuSubButton_sidebarMenuSubButton__Zs-sX{align-items:center;border-radius:var(--p-3);color:var(--sidebar-foreground);cursor:pointer;display:flex;gap:var(--p-1);height:var(--p-9);margin-left:var(--p-3);min-width:0;outline:none;overflow:hidden;padding:var(--p-2) var(--p-3);text-decoration:none;transform:translateX(-1px);width:calc(100% - var(--p-3))}.SidebarMenuSubButton_sidebarMenuSubButton__Zs-sX:visited{color:var(--sidebar-foreground)}.SidebarMenuSubButton_sidebarMenuSubButton__Zs-sX:hover{text-decoration:none}[data-slot=sidebar-menu-sub-item]:active .SidebarMenuSubButton_sidebarMenuSubButton__Zs-sX,[data-slot=sidebar-menu-sub-item]:hover .SidebarMenuSubButton_sidebarMenuSubButton__Zs-sX{background-color:var(--sidebar-accent);color:var(--sidebar-accent-foreground)}.SidebarMenuSubButton_sidebarMenuSubButton__Zs-sX:focus-visible{box-shadow:0 0 0 2px var(--sidebar-ring)}.SidebarMenuSubButton_sidebarMenuSubButton__Zs-sX:disabled,.SidebarMenuSubButton_sidebarMenuSubButton__Zs-sX[aria-disabled=true]{opacity:.5;pointer-events:none}.SidebarMenuSubButton_sidebarMenuSubButton__Zs-sX[data-active=true]{background-color:var(--sidebar-accent);color:var(--sidebar-accent-foreground)}.SidebarMenuSubButton_sidebarMenuSubButton__Zs-sX[data-active=true]:visited{color:var(--sidebar-accent-foreground)}.SidebarMenuSubButton_sidebarMenuSubButton__Zs-sX[data-collapsible=icon]{display:none}.SidebarMenuSubButton_sidebarMenuSubButton__Zs-sX>svg{color:var(--sidebar-accent-foreground);flex-shrink:0;height:1rem;width:1rem}.SidebarMenuSubButton_sidebarMenuSubButtonLabel__8dChT{flex-grow:1;min-width:0}";
|
|
4
|
+
var S = {"sidebarMenuSubButton":"SidebarMenuSubButton_sidebarMenuSubButton__Zs-sX","sidebarMenuSubButtonLabel":"SidebarMenuSubButton_sidebarMenuSubButtonLabel__8dChT"};
|
|
5
|
+
styleInject(css_248z);
|
|
6
|
+
|
|
7
|
+
export { S as default };
|