@sybilion/uilib 1.4.13 → 1.4.14
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/esm/components/ui/Sidebar/Sidebar.js +5 -4
- package/dist/esm/components/ui/Sidebar/Sidebar.styl.js +1 -1
- package/dist/esm/types/src/components/ui/Sidebar/Sidebar.d.ts +4 -2
- package/package.json +1 -1
- package/src/components/ui/Sidebar/Sidebar.styl +6 -2
- package/src/components/ui/Sidebar/Sidebar.tsx +14 -2
- package/src/docs/components/DocsSidebar/DocsSidebar.tsx +14 -8
- package/src/docs/pages/SmartTextTruncatePage.styl +2 -14
- package/src/docs/pages/SmartTextTruncatePage.styl.d.ts +0 -1
- package/src/docs/pages/SmartTextTruncatePage.tsx +0 -6
|
@@ -498,11 +498,12 @@ function SidebarMenu({ className, ...props }) {
|
|
|
498
498
|
function SidebarMenuItem({ className, ...props }) {
|
|
499
499
|
return (jsx("li", { "data-slot": "sidebar-menu-item", "data-sidebar": "menu-item", className: cn(SidebarStem.sidebarMenuItem, className), ...props }));
|
|
500
500
|
}
|
|
501
|
-
function SidebarMenuButton({ asChild = false, isActive = false, hasSubItems = false, isExpanded = false, variant = 'ghost', size = 'sm', className, icon, children, ...props }) {
|
|
501
|
+
function SidebarMenuButton({ asChild = false, isActive = false, hasSubItems = false, isExpanded = false, variant = 'ghost', size = 'sm', className, icon, children, addon, ...props }) {
|
|
502
502
|
const effectiveAsChild = asChild && !hasSubItems;
|
|
503
503
|
const label = (jsx(SmartTextTruncate, { className: SidebarStem.sidebarMenuButtonLabel, children: children }));
|
|
504
504
|
const chevron = hasSubItems ? (jsx("span", { className: cn(SidebarStem.sidebarMenuButtonChevron, isExpanded && SidebarStem.expanded), "aria-hidden": "true", children: jsx(ChevronRight, { size: 16 }) })) : null;
|
|
505
|
-
|
|
505
|
+
const userContent = (jsxs(Fragment, { children: [label, addon] }));
|
|
506
|
+
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' ? SidebarStem.sidebarMenuButtonCta : SidebarStem.sidebarMenuButton, SidebarStem[`size-${size}`], className), ...props, children: [icon, effectiveAsChild ? (userContent) : (jsxs(Fragment, { children: [userContent, chevron] }))] }));
|
|
506
507
|
}
|
|
507
508
|
function SidebarMenuAction({ className, asChild = false, showOnHover = false, ...props }) {
|
|
508
509
|
const Comp = asChild ? Slot : 'button';
|
|
@@ -517,7 +518,7 @@ function SidebarMenuSub({ className, ...props }) {
|
|
|
517
518
|
function SidebarMenuSubItem({ className, ...props }) {
|
|
518
519
|
return (jsx("li", { "data-slot": "sidebar-menu-sub-item", "data-sidebar": "menu-sub-item", className: cn(SidebarStem.sidebarMenuSubItem, className), ...props }));
|
|
519
520
|
}
|
|
520
|
-
function SidebarMenuSubButton({ asChild = false, size = 'md', isActive = false, tooltip, className, onClick, children, ...props }) {
|
|
521
|
+
function SidebarMenuSubButton({ asChild = false, size = 'md', isActive = false, tooltip, className, onClick, children, addon, ...props }) {
|
|
521
522
|
const Comp = asChild ? Slot : 'a';
|
|
522
523
|
const { isOpen } = useSidebarState();
|
|
523
524
|
const { setOpen } = useSidebarActions();
|
|
@@ -527,7 +528,7 @@ function SidebarMenuSubButton({ asChild = false, size = 'md', isActive = false,
|
|
|
527
528
|
setOpen(false);
|
|
528
529
|
onClick?.(event);
|
|
529
530
|
};
|
|
530
|
-
const button = (
|
|
531
|
+
const button = (jsxs(Comp, { "data-slot": "sidebar-menu-sub-button", "data-sidebar": "menu-sub-button", "data-size": size, "data-active": isActive, className: cn(SidebarStem.sidebarMenuSubButton, SidebarStem[`size-${size}`], className), onClick: handleClick, ...props, children: [jsx(SmartTextTruncate, { className: SidebarStem.sidebarMenuSubButtonLabel, children: children }), addon] }));
|
|
531
532
|
if (!tooltip)
|
|
532
533
|
return button;
|
|
533
534
|
if (typeof tooltip === 'string') {
|
|
@@ -1,6 +1,6 @@
|
|
|
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:14px;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;transition:transform .1s ease-out}.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-1);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}}";
|
|
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
4
|
var SidebarStem = {"sidebarWrapper":"Sidebar_sidebarWrapper__DGm4P","sidebarMainShell":"Sidebar_sidebarMainShell__pSWDC","chatPanelMount":"Sidebar_chatPanelMount__1Zctx","sidebar":"Sidebar_sidebar__0vqNZ","sidebarTrigger":"Sidebar_sidebarTrigger__ipx2C","sidebarRail":"Sidebar_sidebarRail__uvSpl","sidebarResizeHandle":"Sidebar_sidebarResizeHandle__kuD6t","fullHeightResizer":"Sidebar_fullHeightResizer__jZXnw","sidebarInput":"Sidebar_sidebarInput__ujQLX","sidebarHeader":"Sidebar_sidebarHeader__X33ii","sidebarFooter":"Sidebar_sidebarFooter__V3O-l","sidebarSeparator":"Sidebar_sidebarSeparator__oUkYG","sidebarContent":"Sidebar_sidebarContent__Ywe1o","sidebarGroup":"Sidebar_sidebarGroup__7Mhg2","sidebarGroupAction":"Sidebar_sidebarGroupAction__OhVZq","sidebarMenu":"Sidebar_sidebarMenu__hYXIo","sidebarMenuItem":"Sidebar_sidebarMenuItem__CRhM8","sidebarMenuBadge":"Sidebar_sidebarMenuBadge__ttvCR","sidebarMenuSkeleton":"Sidebar_sidebarMenuSkeleton__u2KoI","sidebarMenuSkeletonIcon":"Sidebar_sidebarMenuSkeletonIcon__-1tvv","sidebarMenuSkeletonText":"Sidebar_sidebarMenuSkeletonText__dWzWo","sidebarMenuSub":"Sidebar_sidebarMenuSub__gh8Rn","sidebarMenuSubItem":"Sidebar_sidebarMenuSubItem__fTHJa","sheetContentSidebar":"Sidebar_sheetContentSidebar__cM2h2","sheetSidebarLogo":"Sidebar_sheetSidebarLogo__eGVDC","sheetSidebarInner":"Sidebar_sheetSidebarInner__U-SMQ","sidebarNone":"Sidebar_sidebarNone__crRsF","variant-floating":"Sidebar_variant-floating__-qvkJ","variant-inset":"Sidebar_variant-inset__oTfrV","variant-sidebar":"Sidebar_variant-sidebar__fAe77","sidebarMenuButton":"Sidebar_sidebarMenuButton__vIEh-","sidebarMenuSubButton":"Sidebar_sidebarMenuSubButton__c9flh","size-sm":"Sidebar_size-sm__7aIbu","size-md":"Sidebar_size-md__rcjmO","size-lg":"Sidebar_size-lg__1k76S","variant-outline":"Sidebar_variant-outline__UmtAz","sidebarMenuButtonLabel":"Sidebar_sidebarMenuButtonLabel__ropmN","sidebarMenuSubButtonLabel":"Sidebar_sidebarMenuSubButtonLabel__L23CG","sidebarMenuButtonChevron":"Sidebar_sidebarMenuButtonChevron__IPWNA","expanded":"Sidebar_expanded__iPddE","sidebarMenuButtonCta":"Sidebar_sidebarMenuButtonCta__dQAhv","sidebarMenuAction":"Sidebar_sidebarMenuAction__mFZa1","showOnHover":"Sidebar_showOnHover__itXsA","sidebarVtOld":"Sidebar_sidebarVtOld__hlKqn","sidebarVtNew":"Sidebar_sidebarVtNew__FFhYU"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
@@ -82,8 +82,9 @@ declare function SidebarGroupAction({ className, asChild, ...props }: ComponentP
|
|
|
82
82
|
}): import("react/jsx-runtime").JSX.Element;
|
|
83
83
|
declare function SidebarMenu({ className, ...props }: ComponentProps<'ul'>): import("react/jsx-runtime").JSX.Element;
|
|
84
84
|
declare function SidebarMenuItem({ className, ...props }: ComponentProps<'li'>): import("react/jsx-runtime").JSX.Element;
|
|
85
|
-
declare function SidebarMenuButton({ asChild, isActive, hasSubItems, isExpanded, variant, size, className, icon, children, ...props }: Omit<ButtonProps, 'icon'> & {
|
|
85
|
+
declare function SidebarMenuButton({ asChild, isActive, hasSubItems, isExpanded, variant, size, className, icon, children, addon, ...props }: Omit<ButtonProps, 'icon'> & {
|
|
86
86
|
icon?: React.ReactNode;
|
|
87
|
+
addon?: React.ReactNode;
|
|
87
88
|
isActive?: boolean;
|
|
88
89
|
/** When true, renders an expand/collapse chevron (requires a non–asChild button). */
|
|
89
90
|
hasSubItems?: boolean;
|
|
@@ -97,10 +98,11 @@ declare function SidebarMenuAction({ className, asChild, showOnHover, ...props }
|
|
|
97
98
|
declare function SidebarMenuBadge({ className, ...props }: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
98
99
|
declare function SidebarMenuSub({ className, ...props }: ComponentProps<'ul'>): import("react/jsx-runtime").JSX.Element;
|
|
99
100
|
declare function SidebarMenuSubItem({ className, ...props }: ComponentProps<'li'>): import("react/jsx-runtime").JSX.Element;
|
|
100
|
-
declare function SidebarMenuSubButton({ asChild, size, isActive, tooltip, className, onClick, children, ...props }: ComponentProps<'a'> & {
|
|
101
|
+
declare function SidebarMenuSubButton({ asChild, size, isActive, tooltip, className, onClick, children, addon, ...props }: ComponentProps<'a'> & {
|
|
101
102
|
asChild?: boolean;
|
|
102
103
|
size?: 'sm' | 'md' | 'lg';
|
|
103
104
|
isActive?: boolean;
|
|
104
105
|
tooltip?: string | ComponentProps<typeof TooltipContent>;
|
|
106
|
+
addon?: React.ReactNode;
|
|
105
107
|
}): import("react/jsx-runtime").JSX.Element;
|
|
106
108
|
export { PanelResizeHandle, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarResizeHandle, SidebarSeparator, SidebarTrigger, useSidebar, useSidebarActions, useSidebarState, };
|
package/package.json
CHANGED
|
@@ -339,7 +339,7 @@
|
|
|
339
339
|
&::before
|
|
340
340
|
content ''
|
|
341
341
|
position absolute
|
|
342
|
-
left
|
|
342
|
+
left var(--p-5)
|
|
343
343
|
top 0
|
|
344
344
|
bottom 0
|
|
345
345
|
width 1px
|
|
@@ -517,6 +517,10 @@
|
|
|
517
517
|
flex-shrink 0
|
|
518
518
|
align-items center
|
|
519
519
|
transition transform 0.1s ease-out
|
|
520
|
+
opacity 0.5
|
|
521
|
+
|
|
522
|
+
.sidebarMenuButton:hover &
|
|
523
|
+
opacity 1
|
|
520
524
|
|
|
521
525
|
&.expanded
|
|
522
526
|
transform rotate(90deg)
|
|
@@ -620,7 +624,7 @@
|
|
|
620
624
|
height var(--p-9)
|
|
621
625
|
min-width 0
|
|
622
626
|
padding var(--p-2) var(--p-3)
|
|
623
|
-
margin-left var(--p-
|
|
627
|
+
margin-left var(--p-3)
|
|
624
628
|
|
|
625
629
|
overflow hidden
|
|
626
630
|
transform translateX(-1px)
|
|
@@ -949,9 +949,11 @@ function SidebarMenuButton({
|
|
|
949
949
|
className,
|
|
950
950
|
icon,
|
|
951
951
|
children,
|
|
952
|
+
addon,
|
|
952
953
|
...props
|
|
953
954
|
}: Omit<ButtonProps, 'icon'> & {
|
|
954
955
|
icon?: React.ReactNode;
|
|
956
|
+
addon?: React.ReactNode;
|
|
955
957
|
isActive?: boolean;
|
|
956
958
|
/** When true, renders an expand/collapse chevron (requires a non–asChild button). */
|
|
957
959
|
hasSubItems?: boolean;
|
|
@@ -975,6 +977,13 @@ function SidebarMenuButton({
|
|
|
975
977
|
</span>
|
|
976
978
|
) : null;
|
|
977
979
|
|
|
980
|
+
const userContent = (
|
|
981
|
+
<>
|
|
982
|
+
{label}
|
|
983
|
+
{addon}
|
|
984
|
+
</>
|
|
985
|
+
);
|
|
986
|
+
|
|
978
987
|
return (
|
|
979
988
|
<Button
|
|
980
989
|
asChild={effectiveAsChild}
|
|
@@ -993,10 +1002,10 @@ function SidebarMenuButton({
|
|
|
993
1002
|
>
|
|
994
1003
|
{icon}
|
|
995
1004
|
{effectiveAsChild ? (
|
|
996
|
-
|
|
1005
|
+
userContent
|
|
997
1006
|
) : (
|
|
998
1007
|
<>
|
|
999
|
-
{
|
|
1008
|
+
{userContent}
|
|
1000
1009
|
{chevron}
|
|
1001
1010
|
</>
|
|
1002
1011
|
)}
|
|
@@ -1070,12 +1079,14 @@ function SidebarMenuSubButton({
|
|
|
1070
1079
|
className,
|
|
1071
1080
|
onClick,
|
|
1072
1081
|
children,
|
|
1082
|
+
addon,
|
|
1073
1083
|
...props
|
|
1074
1084
|
}: ComponentProps<'a'> & {
|
|
1075
1085
|
asChild?: boolean;
|
|
1076
1086
|
size?: 'sm' | 'md' | 'lg';
|
|
1077
1087
|
isActive?: boolean;
|
|
1078
1088
|
tooltip?: string | ComponentProps<typeof TooltipContent>;
|
|
1089
|
+
addon?: React.ReactNode;
|
|
1079
1090
|
}) {
|
|
1080
1091
|
const Comp = asChild ? Slot : 'a';
|
|
1081
1092
|
const { isOpen } = useSidebarState();
|
|
@@ -1100,6 +1111,7 @@ function SidebarMenuSubButton({
|
|
|
1100
1111
|
<SmartTextTruncate className={S.sidebarMenuSubButtonLabel}>
|
|
1101
1112
|
{children}
|
|
1102
1113
|
</SmartTextTruncate>
|
|
1114
|
+
{addon}
|
|
1103
1115
|
</Comp>
|
|
1104
1116
|
);
|
|
1105
1117
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useEffect, useMemo, useState } from 'react';
|
|
2
|
-
import { Link, useLocation } from 'react-router-dom';
|
|
2
|
+
import { Link, useLocation, useNavigate } from 'react-router-dom';
|
|
3
3
|
|
|
4
4
|
import { Input } from '#uilib/components/ui/Input';
|
|
5
5
|
import {
|
|
@@ -53,7 +53,7 @@ export function DocsSidebar() {
|
|
|
53
53
|
const [sidebarSearch, setSidebarSearch] = useState('');
|
|
54
54
|
const q = sidebarSearch.trim().toLowerCase();
|
|
55
55
|
const isFiltering = q.length > 0;
|
|
56
|
-
|
|
56
|
+
const navigate = useNavigate();
|
|
57
57
|
const activeSection = useMemo(
|
|
58
58
|
() => sectionForPathname(location.pathname),
|
|
59
59
|
[location.pathname],
|
|
@@ -80,6 +80,14 @@ export function DocsSidebar() {
|
|
|
80
80
|
});
|
|
81
81
|
};
|
|
82
82
|
|
|
83
|
+
const handleSubItemClick = (
|
|
84
|
+
e: React.MouseEvent<HTMLAnchorElement>,
|
|
85
|
+
to: string,
|
|
86
|
+
) => {
|
|
87
|
+
e.preventDefault();
|
|
88
|
+
navigate(to);
|
|
89
|
+
};
|
|
90
|
+
|
|
83
91
|
return (
|
|
84
92
|
<Sidebar
|
|
85
93
|
variant="inset"
|
|
@@ -126,7 +134,7 @@ export function DocsSidebar() {
|
|
|
126
134
|
>
|
|
127
135
|
{section}
|
|
128
136
|
</SidebarMenuButton>
|
|
129
|
-
{isExpanded
|
|
137
|
+
{isExpanded && (
|
|
130
138
|
<SidebarMenuSub>
|
|
131
139
|
{filteredEntries.map(e => {
|
|
132
140
|
const to = `/docs/${e.slug}`;
|
|
@@ -134,19 +142,17 @@ export function DocsSidebar() {
|
|
|
134
142
|
return (
|
|
135
143
|
<SidebarMenuSubItem key={e.slug}>
|
|
136
144
|
<SidebarMenuSubButton
|
|
137
|
-
asChild
|
|
138
145
|
isActive={isActive}
|
|
139
146
|
size="md"
|
|
147
|
+
onClick={e => handleSubItemClick(e, to)}
|
|
140
148
|
>
|
|
141
|
-
|
|
142
|
-
<SmartTextTruncate>{e.title}</SmartTextTruncate>
|
|
143
|
-
</Link>
|
|
149
|
+
{e.title}
|
|
144
150
|
</SidebarMenuSubButton>
|
|
145
151
|
</SidebarMenuSubItem>
|
|
146
152
|
);
|
|
147
153
|
})}
|
|
148
154
|
</SidebarMenuSub>
|
|
149
|
-
)
|
|
155
|
+
)}
|
|
150
156
|
</SidebarMenuItem>
|
|
151
157
|
);
|
|
152
158
|
})}
|
|
@@ -3,29 +3,16 @@
|
|
|
3
3
|
color var(--muted-foreground)
|
|
4
4
|
font-size 0.875rem
|
|
5
5
|
|
|
6
|
-
.resizableDemo
|
|
7
|
-
resize horizontal
|
|
8
|
-
overflow auto
|
|
9
|
-
width 200px
|
|
10
|
-
min-width 60px
|
|
11
|
-
max-width 100%
|
|
12
|
-
border 1px solid var(--border)
|
|
13
|
-
border-radius var(--p-2)
|
|
14
|
-
padding var(--p-2)
|
|
15
|
-
margin-bottom var(--p-6)
|
|
16
|
-
|
|
17
6
|
.resizableListDemo
|
|
18
7
|
resize horizontal
|
|
19
8
|
overflow auto
|
|
20
9
|
width 280px
|
|
21
10
|
min-width 120px
|
|
22
11
|
max-width 100%
|
|
12
|
+
max-height 300px
|
|
23
13
|
border 1px solid var(--border)
|
|
24
14
|
border-radius var(--p-2)
|
|
25
15
|
padding var(--p-2)
|
|
26
|
-
display flex
|
|
27
|
-
flex-direction column
|
|
28
|
-
gap var(--p-1)
|
|
29
16
|
|
|
30
17
|
&:active
|
|
31
18
|
border 1px solid var(--brand-color)
|
|
@@ -33,3 +20,4 @@
|
|
|
33
20
|
.demoText
|
|
34
21
|
display block
|
|
35
22
|
width 100%
|
|
23
|
+
margin-bottom var(--p-1)
|
|
@@ -28,12 +28,6 @@ export default function SmartTextTruncatePage() {
|
|
|
28
28
|
/>
|
|
29
29
|
<DocsGuidance source={smartTextTruncateGuidance} />
|
|
30
30
|
<PageContentSection>
|
|
31
|
-
<p className={S.sectionLabel}>Single item</p>
|
|
32
|
-
<div className={S.resizableDemo} data-smart-text-truncate-resize-root>
|
|
33
|
-
<SmartTextTruncate className={S.demoText}>{LONG}</SmartTextTruncate>
|
|
34
|
-
</div>
|
|
35
|
-
|
|
36
|
-
<p className={S.sectionLabel}>List stress test (50 items)</p>
|
|
37
31
|
<div
|
|
38
32
|
className={S.resizableListDemo}
|
|
39
33
|
data-smart-text-truncate-resize-root
|