@cryptlex/web-components 6.6.96 → 6.6.98
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.
|
@@ -693,6 +693,10 @@ export declare const DataTableContext: React.Context<{
|
|
|
693
693
|
id: string;
|
|
694
694
|
} | {
|
|
695
695
|
id: string;
|
|
696
|
+
} | {
|
|
697
|
+
id: string;
|
|
698
|
+
} | {
|
|
699
|
+
id: string;
|
|
696
700
|
} | {
|
|
697
701
|
id: string;
|
|
698
702
|
organizationId: string;
|
|
@@ -776,6 +780,12 @@ export declare const DataTableContext: React.Context<{
|
|
|
776
780
|
id: string;
|
|
777
781
|
} | {
|
|
778
782
|
id: string;
|
|
783
|
+
} | {
|
|
784
|
+
id: string;
|
|
785
|
+
} | {
|
|
786
|
+
id: string;
|
|
787
|
+
} | {
|
|
788
|
+
id: string;
|
|
779
789
|
} | {
|
|
780
790
|
id: string;
|
|
781
791
|
entitlementId: string;
|
|
@@ -802,6 +812,19 @@ export declare const DataTableContext: React.Context<{
|
|
|
802
812
|
id: string;
|
|
803
813
|
} | {
|
|
804
814
|
id: string;
|
|
815
|
+
} | {
|
|
816
|
+
licenseId: string;
|
|
817
|
+
} | {
|
|
818
|
+
licenseId: string;
|
|
819
|
+
} | {
|
|
820
|
+
licenseId: string;
|
|
821
|
+
id: string;
|
|
822
|
+
} | {
|
|
823
|
+
licenseId: string;
|
|
824
|
+
id: string;
|
|
825
|
+
} | {
|
|
826
|
+
licenseId: string;
|
|
827
|
+
id: string;
|
|
805
828
|
} | {
|
|
806
829
|
id: string;
|
|
807
830
|
} | {
|
|
@@ -842,6 +865,19 @@ export declare const DataTableContext: React.Context<{
|
|
|
842
865
|
featureEntitlementId: string;
|
|
843
866
|
} | {
|
|
844
867
|
id: string;
|
|
868
|
+
} | {
|
|
869
|
+
licenseTemplateId: string;
|
|
870
|
+
} | {
|
|
871
|
+
licenseTemplateId: string;
|
|
872
|
+
} | {
|
|
873
|
+
licenseTemplateId: string;
|
|
874
|
+
id: string;
|
|
875
|
+
} | {
|
|
876
|
+
licenseTemplateId: string;
|
|
877
|
+
id: string;
|
|
878
|
+
} | {
|
|
879
|
+
licenseTemplateId: string;
|
|
880
|
+
id: string;
|
|
845
881
|
} | {
|
|
846
882
|
id: string;
|
|
847
883
|
} | {
|
|
@@ -944,6 +980,25 @@ export declare const DataTableContext: React.Context<{
|
|
|
944
980
|
id: string;
|
|
945
981
|
} | {
|
|
946
982
|
id: string;
|
|
983
|
+
} | {
|
|
984
|
+
productId: string;
|
|
985
|
+
} | {
|
|
986
|
+
productId: string;
|
|
987
|
+
} | {
|
|
988
|
+
productId: string;
|
|
989
|
+
id: string;
|
|
990
|
+
} | {
|
|
991
|
+
productId: string;
|
|
992
|
+
id: string;
|
|
993
|
+
} | {
|
|
994
|
+
productId: string;
|
|
995
|
+
id: string;
|
|
996
|
+
} | {
|
|
997
|
+
id: string;
|
|
998
|
+
} | {
|
|
999
|
+
id: string;
|
|
1000
|
+
} | {
|
|
1001
|
+
id: string;
|
|
947
1002
|
} | {
|
|
948
1003
|
id: string;
|
|
949
1004
|
} | {
|
|
@@ -951,10 +1006,17 @@ export declare const DataTableContext: React.Context<{
|
|
|
951
1006
|
} | {
|
|
952
1007
|
id: string;
|
|
953
1008
|
} | {
|
|
1009
|
+
productId: string;
|
|
1010
|
+
} | {
|
|
1011
|
+
productId: string;
|
|
1012
|
+
} | {
|
|
1013
|
+
productId: string;
|
|
954
1014
|
id: string;
|
|
955
1015
|
} | {
|
|
1016
|
+
productId: string;
|
|
956
1017
|
id: string;
|
|
957
1018
|
} | {
|
|
1019
|
+
productId: string;
|
|
958
1020
|
id: string;
|
|
959
1021
|
} | {
|
|
960
1022
|
id: string;
|
|
@@ -1131,6 +1193,14 @@ export declare const DataTableContext: React.Context<{
|
|
|
1131
1193
|
id: string;
|
|
1132
1194
|
} | {
|
|
1133
1195
|
id: string;
|
|
1196
|
+
} | {
|
|
1197
|
+
id: string;
|
|
1198
|
+
tenantId: string;
|
|
1199
|
+
} | {
|
|
1200
|
+
id: string;
|
|
1201
|
+
tenantId: string;
|
|
1202
|
+
} | {
|
|
1203
|
+
id: string;
|
|
1134
1204
|
} | {
|
|
1135
1205
|
id: string;
|
|
1136
1206
|
} | {
|
|
@@ -1516,6 +1586,10 @@ export declare function useDataTable(): {
|
|
|
1516
1586
|
id: string;
|
|
1517
1587
|
} | {
|
|
1518
1588
|
id: string;
|
|
1589
|
+
} | {
|
|
1590
|
+
id: string;
|
|
1591
|
+
} | {
|
|
1592
|
+
id: string;
|
|
1519
1593
|
} | {
|
|
1520
1594
|
id: string;
|
|
1521
1595
|
organizationId: string;
|
|
@@ -1599,6 +1673,12 @@ export declare function useDataTable(): {
|
|
|
1599
1673
|
id: string;
|
|
1600
1674
|
} | {
|
|
1601
1675
|
id: string;
|
|
1676
|
+
} | {
|
|
1677
|
+
id: string;
|
|
1678
|
+
} | {
|
|
1679
|
+
id: string;
|
|
1680
|
+
} | {
|
|
1681
|
+
id: string;
|
|
1602
1682
|
} | {
|
|
1603
1683
|
id: string;
|
|
1604
1684
|
entitlementId: string;
|
|
@@ -1625,6 +1705,19 @@ export declare function useDataTable(): {
|
|
|
1625
1705
|
id: string;
|
|
1626
1706
|
} | {
|
|
1627
1707
|
id: string;
|
|
1708
|
+
} | {
|
|
1709
|
+
licenseId: string;
|
|
1710
|
+
} | {
|
|
1711
|
+
licenseId: string;
|
|
1712
|
+
} | {
|
|
1713
|
+
licenseId: string;
|
|
1714
|
+
id: string;
|
|
1715
|
+
} | {
|
|
1716
|
+
licenseId: string;
|
|
1717
|
+
id: string;
|
|
1718
|
+
} | {
|
|
1719
|
+
licenseId: string;
|
|
1720
|
+
id: string;
|
|
1628
1721
|
} | {
|
|
1629
1722
|
id: string;
|
|
1630
1723
|
} | {
|
|
@@ -1665,6 +1758,19 @@ export declare function useDataTable(): {
|
|
|
1665
1758
|
featureEntitlementId: string;
|
|
1666
1759
|
} | {
|
|
1667
1760
|
id: string;
|
|
1761
|
+
} | {
|
|
1762
|
+
licenseTemplateId: string;
|
|
1763
|
+
} | {
|
|
1764
|
+
licenseTemplateId: string;
|
|
1765
|
+
} | {
|
|
1766
|
+
licenseTemplateId: string;
|
|
1767
|
+
id: string;
|
|
1768
|
+
} | {
|
|
1769
|
+
licenseTemplateId: string;
|
|
1770
|
+
id: string;
|
|
1771
|
+
} | {
|
|
1772
|
+
licenseTemplateId: string;
|
|
1773
|
+
id: string;
|
|
1668
1774
|
} | {
|
|
1669
1775
|
id: string;
|
|
1670
1776
|
} | {
|
|
@@ -1767,6 +1873,25 @@ export declare function useDataTable(): {
|
|
|
1767
1873
|
id: string;
|
|
1768
1874
|
} | {
|
|
1769
1875
|
id: string;
|
|
1876
|
+
} | {
|
|
1877
|
+
productId: string;
|
|
1878
|
+
} | {
|
|
1879
|
+
productId: string;
|
|
1880
|
+
} | {
|
|
1881
|
+
productId: string;
|
|
1882
|
+
id: string;
|
|
1883
|
+
} | {
|
|
1884
|
+
productId: string;
|
|
1885
|
+
id: string;
|
|
1886
|
+
} | {
|
|
1887
|
+
productId: string;
|
|
1888
|
+
id: string;
|
|
1889
|
+
} | {
|
|
1890
|
+
id: string;
|
|
1891
|
+
} | {
|
|
1892
|
+
id: string;
|
|
1893
|
+
} | {
|
|
1894
|
+
id: string;
|
|
1770
1895
|
} | {
|
|
1771
1896
|
id: string;
|
|
1772
1897
|
} | {
|
|
@@ -1774,10 +1899,17 @@ export declare function useDataTable(): {
|
|
|
1774
1899
|
} | {
|
|
1775
1900
|
id: string;
|
|
1776
1901
|
} | {
|
|
1902
|
+
productId: string;
|
|
1903
|
+
} | {
|
|
1904
|
+
productId: string;
|
|
1905
|
+
} | {
|
|
1906
|
+
productId: string;
|
|
1777
1907
|
id: string;
|
|
1778
1908
|
} | {
|
|
1909
|
+
productId: string;
|
|
1779
1910
|
id: string;
|
|
1780
1911
|
} | {
|
|
1912
|
+
productId: string;
|
|
1781
1913
|
id: string;
|
|
1782
1914
|
} | {
|
|
1783
1915
|
id: string;
|
|
@@ -1954,6 +2086,14 @@ export declare function useDataTable(): {
|
|
|
1954
2086
|
id: string;
|
|
1955
2087
|
} | {
|
|
1956
2088
|
id: string;
|
|
2089
|
+
} | {
|
|
2090
|
+
id: string;
|
|
2091
|
+
tenantId: string;
|
|
2092
|
+
} | {
|
|
2093
|
+
id: string;
|
|
2094
|
+
tenantId: string;
|
|
2095
|
+
} | {
|
|
2096
|
+
id: string;
|
|
1957
2097
|
} | {
|
|
1958
2098
|
id: string;
|
|
1959
2099
|
} | {
|
|
@@ -96,7 +96,7 @@ export declare function SidebarMenuSub({ className, ...props }: React.ComponentP
|
|
|
96
96
|
* Submenu item wrapper
|
|
97
97
|
*/
|
|
98
98
|
export declare function SidebarMenuSubItem({ className, ...props }: React.ComponentProps<'li'>): import("react/jsx-runtime").JSX.Element;
|
|
99
|
-
export declare const sidebarMenuButtonClasses = "btn-tab rounded-
|
|
99
|
+
export declare const sidebarMenuButtonClasses = "btn-tab relative rounded-md border-0 justify-start w-full group-data-[collapsible=icon]:justify-center";
|
|
100
100
|
/**
|
|
101
101
|
* Main menu button. Pass isActive for current page.
|
|
102
102
|
*/
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as a,jsxs as h}from"react/jsx-runtime";import{createContext as _,useState as w,useCallback as S,useEffect as j,useMemo as D,use as z}from"react";import{Button as N}from"./button.js";import{DialogTrigger as B,DialogOverlay as I,DialogContent as T}from"./dialog.js";import{TooltipTrigger as E,Tooltip as G}from"./tooltip.js";import{classNames as i}from"../utilities/theme.js";import{useIsMobile as H}from"../utilities/use-mobile.js";import{IcMoreHorizontal as K,IcLeft as L,IcRight as R}from"./icons.js";import"class-variance-authority";import"react-aria-components";import"./loader.js";import"clsx";import"@icons-pack/react-simple-icons";const A="/",y=_(null);function v(){const e=z(y);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function ae({defaultOpen:e=!0,open:t,onOpenChange:o,className:n,style:r,children:s,...u}){const d=H(),[c,p]=w(!1),[C,k]=w(e),f=t??C,m=S(l=>{const b=typeof l=="function"?l(f):l;o?o(b):k(b)},[o,f]),g=S(()=>d?p(l=>!l):m(l=>!l),[d,m,p]);j(()=>{const l=b=>{b.key===A&&(b.metaKey||b.ctrlKey)&&(b.preventDefault(),g())};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[g]);const x=f?"expanded":"collapsed",O=D(()=>({state:x,open:f,setOpen:m,isMobile:d,openMobile:c,setOpenMobile:p,toggleSidebar:g}),[x,f,m,d,c,p,g]);return a(y.Provider,{value:O,children:a("div",{className:i("group/sidebar-wrapper flex w-full has-[[data-variant=inset]]:bg-elevation-1",n),...u,children:s})})}function ie({side:e="left",variant:t="sidebar",collapsible:o="icon",className:n,children:r,...s}){const{isMobile:u,state:d,openMobile:c,setOpenMobile:p}=v();return o==="none"?a("div",{className:i("flex h-full w-(--sidebar-width) flex-col bg-elevation-1 text-foreground",n),...s,children:r}):u?a(B,{isOpen:c,onOpenChange:p,...s,children:a(I,{children:a(T,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) max-h-svh overflow-auto p-0 [&>button]:hidden",side:"left",children:()=>a("div",{className:"flex h-full w-full flex-col",children:r})})})}):h("div",{className:"group peer hidden text-foreground md:block","data-state":d,"data-collapsible":d==="collapsed"?o:"","data-variant":t,"data-side":e,children:[a("div",{className:i("relative w-(--sidebar-width) bg-elevation-1 transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),a("div",{className:i("absolute z-10 hidden w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",n),...s,children:a("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-elevation-1 group-data-[variant=floating]:border group-data-[variant=floating]:border-border",children:r})})]})}function F({className:e,onClick:t,...o}){const{toggleSidebar:n,open:r,isMobile:s}=v();return a(N,{"data-sidebar":"trigger",variant:"neutral",size:"icon-sm",className:i(e,"!rounded-full"),onClick:u=>{t?.(u),n()},...o,children:s?a(K,{}):r?a(L,{}):a(R,{})})}function oe({className:e,...t}){return a("div",{"data-sidebar":"content",className:i("flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto overflow-x-hidden",e),...t})}function ne({className:e,...t}){return a("div",{"data-sidebar":"group",className:i("relative flex w-full min-w-0 flex-col px-3 group-data-[collapsible=icon]:items-center",e),...t})}function re({className:e,...t}){return a("div",{"data-sidebar":"group-label",className:i("mx-2 mt-2 pt-2 border-t first:border-t-0 flex h-input shrink-0 items-center overflow-hidden text-xs select-none font-medium uppercase text-muted-foreground outline-none ring-ring transition-[height,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-icon [&>svg]:shrink-0","group-data-[collapsible=icon]:pointer-events-none group-data-[collapsible=icon]:!h-px group-data-[collapsible=icon]:min-h-px group-data-[collapsible=icon]:opacity-100 group-data-[collapsible=icon]:w-6 group-data-[collapsible=icon]:pt-0 group-data-[collapsible=icon]:mb-2 group-data-[collapsible=icon]:first:hidden",e),...t})}function le({className:e,...t}){return a("div",{"data-sidebar":"group-content",className:i("w-full body-sm",e),...t})}function se({className:e,...t}){return a("ul",{"data-sidebar":"menu",className:i("flex w-full min-w-0 flex-col",e),...t})}function de({className:e,...t}){return a("li",{"data-sidebar":"menu-item",className:i("group/menu-item relative list-none group-data-[collapsible=icon]:[&>*:not([data-sidebar=menu-button])]:hidden",e),...t})}function ce({className:e,...t}){return a("button",{"data-sidebar":"menu-action",className:i("absolute top-0 right-0 btn btn-ghost h-input","group-data-[collapsible=icon]:hidden",e),...t})}function ue({className:e,number:t,...o}){return a("div",{"data-sidebar":"menu-badge",className:i("absolute pointer-events-none top-0 right-0 font-light h-input select-none flex items-center justify-center body-sm tabular-nums","group-data-[collapsible=icon]:hidden",e),...o,children:new Intl.NumberFormat(navigator.language,{useGrouping:!0}).format(t)})}function be({className:e,...t}){return a("ul",{"data-sidebar":"menu-sub",className:i("ms-2 flex min-w-0 flex-col","group-data-[collapsible=icon]:hidden",e),...t})}function pe({className:e,...t}){return a("li",{className:i("list-none ms-0",e),...t})}const M="btn-tab relative rounded-md border-0 justify-start w-full group-data-[collapsible=icon]:justify-center";function fe({isActive:e=!1,className:t,children:o,icon:n,leading:r,...s}){const{isMobile:u,state:d}=v(),c=!u&&d==="collapsed";return h(E,{isDisabled:!c,children:[h(N,{size:c?"icon":void 0,"data-sidebar":"menu-button",...e&&{"data-selected":!0},className:i("peer/menu-button group/active group-has-[[data-sidebar=menu-action]]/menu-item:pr-input",M,t),...s,children:[a("span",{"aria-hidden":!0,className:"absolute inset-y-2 -left-1 w-[7px] rounded-full bg-primary opacity-0 group-data-[selected=true]/active:opacity-100"}),r!==void 0?r:n?a(n,{}):null,!c&&o]}),a(G,{placement:"right",children:a("span",{className:"flex items-center gap-2",children:o})})]})}function me({isActive:e,className:t,...o}){return a("button",{"data-sidebar":"menu-sub-button","data-active":e,className:i(M,t),...o})}function ge({className:e,logo:t,children:o,showTrigger:n=!0,...r}){return h("div",{"data-sidebar":"header",className:i("flex items-center h-header select-none shrink-0 border-b px-2 gap-2 group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:px-0",e),...r,children:[t&&a("div",{className:"flex items-center justify-center size-input shrink-0",children:t}),o&&a("div",{className:"flex-1 min-w-0 group-data-[collapsible=icon]:hidden",children:o}),n&&a(F,{className:"hidden bg-elevation-1 lg:flex lg:absolute lg:-right-4 lg:z-50"})]})}function he({className:e,...t}){return a("div",{"data-sidebar":"footer",className:i("mt-auto flex shrink-0 select-none items-center gap-2 border-t py-2 group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:px-0",e),...t})}function ve({className:e,...t}){return a("div",{className:i(e,"flex flex-col flex-1 overflow-auto"),...t})}function xe({className:e,...t}){return a("div",{className:i(e,"flex-1 overflow-auto"),...t})}function we({className:e,...t}){return a("nav",{className:i("flex items-center h-header bg-elevation-1 p-2 border-b",e),...t})}export{ie as Sidebar,oe as SidebarContent,y as SidebarContext,he as SidebarFooter,ne as SidebarGroup,le as SidebarGroupContent,re as SidebarGroupLabel,ge as SidebarHeader,se as SidebarMenu,ce as SidebarMenuAction,ue as SidebarMenuBadge,fe as SidebarMenuButton,de as SidebarMenuItem,be as SidebarMenuSub,me as SidebarMenuSubButton,pe as SidebarMenuSubItem,ve as SidebarOutlet,xe as SidebarOutletContent,we as SidebarOutletHeader,ae as SidebarProvider,F as SidebarTrigger,M as sidebarMenuButtonClasses,v as useSidebar};
|
|
2
2
|
//# sourceMappingURL=sidebar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar.js","sources":["../../lib/components/sidebar.tsx"],"sourcesContent":["'use client';\nimport { createContext, use, useCallback, useEffect, useMemo, useState } from 'react';\nimport { Button } from '../components/button';\nimport { DialogContent, DialogOverlay, DialogTrigger } from '../components/dialog';\nimport { Tooltip, TooltipTrigger } from '../components/tooltip';\nimport { classNames } from '../utilities/theme';\nimport { useIsMobile } from '../utilities/use-mobile';\nimport { IcLeft, IcMoreHorizontal, IcRight, type CtxIcon } from './icons';\n\nconst SIDEBAR_KEYBOARD_SHORTCUT = '/';\n\ntype SidebarContextProps = {\n state: 'expanded' | 'collapsed';\n open: boolean;\n setOpen: (open: boolean) => void;\n openMobile: boolean;\n setOpenMobile: (open: boolean) => void;\n isMobile: boolean;\n toggleSidebar: () => void;\n};\n\nexport const SidebarContext = createContext<SidebarContextProps | null>(null);\n\n/**\n * Get the current sidebar state and controls. Must be inside SidebarProvider.\n * @throws When used outside of SidebarProvider\n */\nexport function useSidebar() {\n const context = use(SidebarContext);\n if (!context) {\n throw new Error('useSidebar must be used within a SidebarProvider.');\n }\n\n return context;\n}\n\n/**\n * Wraps your app layout and manages sidebar state. Handles keyboard shortcuts (Cmd/Ctrl + /)\n * and mobile vs desktop behavior.\n *\n * @example\n * <SidebarProvider>\n * <Sidebar>...</Sidebar>\n * <SidebarOutlet>\n * <main>Your app content</main>\n * </SidebarOutlet>\n * </SidebarProvider>\n */\nexport function SidebarProvider({\n defaultOpen = true,\n open: openProp,\n onOpenChange: setOpenProp,\n className,\n style,\n children,\n ...props\n}: React.ComponentProps<'div'> & {\n /** Initial open state. Defaults to true */\n defaultOpen?: boolean;\n /** Control the open state yourself */\n open?: boolean;\n /** Callback when sidebar opens/closes */\n onOpenChange?: (open: boolean) => void;\n}) {\n const isMobile = useIsMobile();\n const [openMobile, setOpenMobile] = useState(false);\n\n // This is the internal state of the sidebar.\n // We use openProp and setOpenProp for control from outside the component.\n const [_open, _setOpen] = useState(defaultOpen);\n const open = openProp ?? _open;\n const setOpen = useCallback(\n (value: boolean | ((value: boolean) => boolean)) => {\n const openState = typeof value === 'function' ? value(open) : value;\n if (setOpenProp) {\n setOpenProp(openState);\n } else {\n _setOpen(openState);\n }\n },\n [setOpenProp, open]\n );\n\n // Helper to toggle the sidebar.\n const toggleSidebar = useCallback(() => {\n return isMobile ? setOpenMobile(open => !open) : setOpen(open => !open);\n }, [isMobile, setOpen, setOpenMobile]);\n\n // Adds a keyboard shortcut to toggle the sidebar.\n useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {\n event.preventDefault();\n toggleSidebar();\n }\n };\n\n window.addEventListener('keydown', handleKeyDown);\n return () => window.removeEventListener('keydown', handleKeyDown);\n }, [toggleSidebar]);\n\n // We add a state so that we can do data-state=\"expanded\" or \"collapsed\".\n // This makes it easier to style the sidebar with Tailwind classes.\n const state = open ? 'expanded' : 'collapsed';\n\n const contextValue = useMemo<SidebarContextProps>(\n () => ({\n state,\n open,\n setOpen,\n isMobile,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n }),\n [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]\n );\n\n return (\n <SidebarContext.Provider value={contextValue}>\n <div\n className={classNames(\n 'group/sidebar-wrapper flex w-full has-[[data-variant=inset]]:bg-elevation-1',\n className\n )}\n {...props}\n >\n {children}\n </div>\n </SidebarContext.Provider>\n );\n}\n\n/**\n * The actual sidebar panel. On mobile it becomes a modal dialog.\n */\nexport function Sidebar({\n side = 'left',\n variant = 'sidebar',\n collapsible = 'icon',\n className,\n children,\n ...props\n}: React.ComponentProps<'div'> & {\n /** Where to dock the sidebar. Default: left */\n side?: 'left' | 'right';\n /** Style variant. Default: sidebar */\n variant?: 'sidebar' | 'floating';\n /** How it collapses. Default: offcanvas */\n collapsible?: 'offcanvas' | 'icon' | 'none';\n}) {\n const { isMobile, state, openMobile, setOpenMobile } = useSidebar();\n\n if (collapsible === 'none') {\n return (\n <div\n className={classNames(\n 'flex h-full w-(--sidebar-width) flex-col bg-elevation-1 text-foreground',\n className\n )}\n {...props}\n >\n {children}\n </div>\n );\n }\n\n if (isMobile) {\n return (\n <DialogTrigger isOpen={openMobile} onOpenChange={setOpenMobile} {...props}>\n <DialogOverlay>\n <DialogContent\n data-sidebar=\"sidebar\"\n data-mobile=\"true\"\n className=\"w-(--sidebar-width) max-h-svh overflow-auto p-0 [&>button]:hidden\"\n side=\"left\"\n >\n {() => <div className=\"flex h-full w-full flex-col\">{children}</div>}\n </DialogContent>\n </DialogOverlay>\n </DialogTrigger>\n );\n }\n\n return (\n <div\n className=\"group peer hidden text-foreground md:block\"\n data-state={state}\n data-collapsible={state === 'collapsed' ? collapsible : ''}\n data-variant={variant}\n data-side={side}\n >\n {/* This is what handles the sidebar gap on desktop */}\n <div\n className={classNames(\n 'relative w-(--sidebar-width) bg-elevation-1 transition-[width] duration-200 ease-linear',\n 'group-data-[collapsible=offcanvas]:w-0',\n 'group-data-[side=right]:rotate-180',\n variant === 'floating'\n ? 'group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]'\n : 'group-data-[collapsible=icon]:w-(--sidebar-width-icon)'\n )}\n />\n <div\n className={classNames(\n 'absolute z-10 hidden w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex',\n side === 'left'\n ? 'left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]'\n : 'right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]',\n // Adjust the padding for floating variant.\n variant === 'floating'\n ? 'group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]'\n : 'group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l',\n className\n )}\n {...props}\n >\n <div\n data-sidebar=\"sidebar\"\n className=\"flex h-full w-full flex-col bg-elevation-1 group-data-[variant=floating]:border group-data-[variant=floating]:border-border\"\n >\n {children}\n </div>\n </div>\n </div>\n );\n}\n\n/**\n * Button that toggles the sidebar. Shows arrow icons.\n */\nexport function SidebarTrigger({ className, onClick, ...props }: React.ComponentProps<typeof Button>) {\n const { toggleSidebar, open, isMobile } = useSidebar();\n\n return (\n <Button\n data-sidebar=\"trigger\"\n variant=\"neutral\"\n size=\"icon-sm\"\n className={classNames(className, '!rounded-full')}\n onClick={event => {\n onClick?.(event);\n toggleSidebar();\n }}\n {...props}\n >\n {/* Use transition to rotate a single icon */}\n {isMobile ? <IcMoreHorizontal /> : open ? <IcLeft /> : <IcRight />}\n </Button>\n );\n}\n\n/**\n * Scrollable container for sidebar content\n */\nexport function SidebarContent({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-sidebar=\"content\"\n className={classNames(\n 'flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden',\n className\n )}\n {...props}\n />\n );\n}\n\n/**\n * Groups related menu items together\n */\nexport function SidebarGroup({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-sidebar=\"group\"\n className={classNames(\n 'relative flex w-full min-w-0 flex-col group-data-[collapsible=icon]:items-center group-data-[collapsible=icon]:px-2',\n className\n )}\n {...props}\n />\n );\n}\n\n/**\n * Label for a group.\n */\nexport function SidebarGroupLabel({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-sidebar=\"group-label\"\n className={classNames(\n 'flex h-input shrink-0 items-center overflow-hidden px-2 text-xs select-none font-medium uppercase text-muted-foreground outline-none ring-ring transition-[height,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-icon [&>svg]:shrink-0',\n 'group-data-[collapsible=icon]:pointer-events-none group-data-[collapsible=icon]:!h-0 group-data-[collapsible=icon]:min-h-0 group-data-[collapsible=icon]:opacity-0',\n className\n )}\n {...props}\n />\n );\n}\n\n/**\n * Content wrapper for a group\n */\nexport function SidebarGroupContent({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-sidebar=\"group-content\" className={classNames('w-full body-sm', className)} {...props} />;\n}\n\n/**\n * Container for menu items\n */\nexport function SidebarMenu({ className, ...props }: React.ComponentProps<'ul'>) {\n return <ul data-sidebar=\"menu\" className={classNames('flex w-full min-w-0 flex-col', className)} {...props} />;\n}\n\n/**\n * Single menu item wrapper\n */\nexport function SidebarMenuItem({ className, ...props }: React.ComponentProps<'li'>) {\n return (\n <li\n data-sidebar=\"menu-item\"\n className={classNames(\n 'group/menu-item relative list-none group-data-[collapsible=icon]:[&>*:not([data-sidebar=menu-button])]:hidden',\n className\n )}\n {...props}\n />\n );\n}\n\n/**\n * Extra action button that appears on the right side of menu items\n */\nexport function SidebarMenuAction({\n className,\n ...props\n}: React.ComponentProps<'button'> & {\n /** Only show on hover */\n showOnHover?: boolean;\n}) {\n return (\n <button\n data-sidebar=\"menu-action\"\n className={classNames(\n 'absolute top-0 right-0 btn btn-ghost h-input',\n 'group-data-[collapsible=icon]:hidden',\n className\n )}\n {...props}\n />\n );\n}\n\n/**\n * Shows a number badge on menu items. Auto-formats large numbers.\n */\nexport function SidebarMenuBadge({\n className,\n number,\n ...props\n}: Omit<React.ComponentProps<'div'>, 'children'> & {\n /** The count to display */\n number: number | bigint;\n}) {\n return (\n <div\n data-sidebar=\"menu-badge\"\n className={classNames(\n 'absolute pointer-events-none top-0 right-0 font-light h-input select-none flex items-center justify-center body-sm tabular-nums',\n 'group-data-[collapsible=icon]:hidden',\n className\n )}\n {...props}\n >\n {/* Format the number */}\n {new Intl.NumberFormat(navigator.language, { useGrouping: true }).format(number)}\n </div>\n );\n}\n\n/**\n * Nested submenu container\n */\nexport function SidebarMenuSub({ className, ...props }: React.ComponentProps<'ul'>) {\n return (\n <ul\n data-sidebar=\"menu-sub\"\n className={classNames('ms-2 flex min-w-0 flex-col', 'group-data-[collapsible=icon]:hidden', className)}\n {...props}\n />\n );\n}\n\n/**\n * Submenu item wrapper\n */\nexport function SidebarMenuSubItem({ className, ...props }: React.ComponentProps<'li'>) {\n return <li className={classNames('list-none ms-0', className)} {...props} />;\n}\n\nexport const sidebarMenuButtonClasses =\n 'btn-tab rounded-none border-0 justify-start w-full group-data-[collapsible=icon]:!rounded-md group-data-[collapsible=icon]:justify-center';\n\n// Common interaction logic for SidebarMenuButton and SidebarMenuSubButton\n/**\n * Main menu button. Pass isActive for current page.\n */\nexport function SidebarMenuButton({\n isActive = false,\n className,\n children,\n icon: Icon,\n leading,\n ...props\n}: Omit<React.ComponentProps<typeof Button>, 'children'> & {\n /** Mark as currently active page */\n icon?: CtxIcon;\n leading?: React.ReactNode;\n isActive?: boolean;\n children?: React.ReactNode;\n}) {\n const { isMobile, state } = useSidebar();\n const isCollapsed = !isMobile && state === 'collapsed';\n\n return (\n <TooltipTrigger isDisabled={!isCollapsed}>\n <Button\n size={isCollapsed ? 'icon' : undefined}\n data-sidebar=\"menu-button\"\n {...(isActive && { 'data-selected': true })}\n className={classNames(\n 'peer/menu-button group-has-[[data-sidebar=menu-action]]/menu-item:pr-input',\n sidebarMenuButtonClasses,\n className\n )}\n {...props}\n >\n {leading !== undefined ? leading : Icon ? <Icon /> : null}\n {!isCollapsed && children}\n </Button>\n <Tooltip placement=\"right\">\n <span className=\"flex items-center gap-2\">{children}</span>\n </Tooltip>\n </TooltipTrigger>\n );\n}\n\n/**\n * Button for submenu items\n */\nexport function SidebarMenuSubButton({\n isActive,\n className,\n ...props\n}: React.ComponentProps<'button'> & {\n isActive?: boolean;\n}) {\n return (\n <button\n data-sidebar=\"menu-sub-button\"\n data-active={isActive}\n className={classNames(sidebarMenuButtonClasses, className)}\n {...props}\n />\n );\n}\n\n/**\n * Sticky header at the top of the sidebar. Displays a square logo slot aligned with the outlet header.\n */\nexport function SidebarHeader({\n className,\n logo,\n children,\n showTrigger = true,\n ...props\n}: React.ComponentProps<'div'> & {\n /** Square logo/icon to display */\n logo?: React.ReactNode;\n showTrigger?: boolean;\n}) {\n return (\n <div\n data-sidebar=\"header\"\n className={classNames(\n 'flex items-center h-header select-none shrink-0 border-b px-2 gap-2 group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:px-0',\n className\n )}\n {...props}\n >\n {logo && <div className=\"flex items-center justify-center size-input shrink-0\">{logo}</div>}\n {children && <div className=\"flex-1 min-w-0 group-data-[collapsible=icon]:hidden\">{children}</div>}\n {showTrigger && (\n <SidebarTrigger className={'hidden bg-elevation-1 lg:flex lg:absolute lg:-right-4 lg:z-50'} />\n )}\n </div>\n );\n}\n\nexport function SidebarFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-sidebar=\"footer\"\n className={classNames(\n 'mt-auto flex shrink-0 select-none items-center gap-2 border-t py-2 group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:px-0',\n className\n )}\n {...props}\n />\n );\n}\n\n/**\n *\n * @example Basic usage\n * ```tsx\n * <SidebarOutlet>\n * <SidebarOutletHeader><SidebarTrigger/></SidebarOutletHeader>\n * <SidebarOutletContent><Outlet/></SidebarOutletContent>\n * </SidebarOutlet>\n * ```\n */\nexport function SidebarOutlet({ className, ...props }: React.ComponentProps<'div'>) {\n return <div className={classNames(className, 'flex flex-col flex-1 overflow-auto')} {...props} />;\n}\n\nexport function SidebarOutletContent({ className, ...props }: React.ComponentProps<'div'>) {\n return <div className={classNames(className, 'flex-1 overflow-auto')} {...props} />;\n}\n\nexport function SidebarOutletHeader({ className, ...props }: React.ComponentProps<'nav'>) {\n return (\n <nav className={classNames('flex items-center h-header bg-elevation-1 p-2 border-b', className)} {...props} />\n );\n}\n"],"names":["SIDEBAR_KEYBOARD_SHORTCUT","SidebarContext","createContext","useSidebar","context","use","SidebarProvider","defaultOpen","openProp","setOpenProp","className","style","children","props","isMobile","useIsMobile","openMobile","setOpenMobile","useState","_open","_setOpen","open","setOpen","useCallback","value","openState","toggleSidebar","useEffect","handleKeyDown","event","state","contextValue","useMemo","jsx","classNames","Sidebar","side","variant","collapsible","DialogTrigger","DialogOverlay","DialogContent","jsxs","SidebarTrigger","onClick","Button","IcMoreHorizontal","IcLeft","IcRight","SidebarContent","SidebarGroup","SidebarGroupLabel","SidebarGroupContent","SidebarMenu","SidebarMenuItem","SidebarMenuAction","SidebarMenuBadge","number","SidebarMenuSub","SidebarMenuSubItem","sidebarMenuButtonClasses","SidebarMenuButton","isActive","Icon","leading","isCollapsed","TooltipTrigger","Tooltip","SidebarMenuSubButton","SidebarHeader","logo","showTrigger","SidebarFooter","SidebarOutlet","SidebarOutletContent","SidebarOutletHeader"],"mappings":"qpBASA,MAAMA,EAA4B,IAYrBC,EAAiBC,EAA0C,IAAI,EAMrE,SAASC,GAAa,CACzB,MAAMC,EAAUC,EAAIJ,CAAc,EAClC,GAAI,CAACG,EACD,MAAM,IAAI,MAAM,mDAAmD,EAGv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|
|
1
|
+
{"version":3,"file":"sidebar.js","sources":["../../lib/components/sidebar.tsx"],"sourcesContent":["'use client';\nimport { createContext, use, useCallback, useEffect, useMemo, useState } from 'react';\nimport { Button } from '../components/button';\nimport { DialogContent, DialogOverlay, DialogTrigger } from '../components/dialog';\nimport { Tooltip, TooltipTrigger } from '../components/tooltip';\nimport { classNames } from '../utilities/theme';\nimport { useIsMobile } from '../utilities/use-mobile';\nimport { IcLeft, IcMoreHorizontal, IcRight, type CtxIcon } from './icons';\n\nconst SIDEBAR_KEYBOARD_SHORTCUT = '/';\n\ntype SidebarContextProps = {\n state: 'expanded' | 'collapsed';\n open: boolean;\n setOpen: (open: boolean) => void;\n openMobile: boolean;\n setOpenMobile: (open: boolean) => void;\n isMobile: boolean;\n toggleSidebar: () => void;\n};\n\nexport const SidebarContext = createContext<SidebarContextProps | null>(null);\n\n/**\n * Get the current sidebar state and controls. Must be inside SidebarProvider.\n * @throws When used outside of SidebarProvider\n */\nexport function useSidebar() {\n const context = use(SidebarContext);\n if (!context) {\n throw new Error('useSidebar must be used within a SidebarProvider.');\n }\n\n return context;\n}\n\n/**\n * Wraps your app layout and manages sidebar state. Handles keyboard shortcuts (Cmd/Ctrl + /)\n * and mobile vs desktop behavior.\n *\n * @example\n * <SidebarProvider>\n * <Sidebar>...</Sidebar>\n * <SidebarOutlet>\n * <main>Your app content</main>\n * </SidebarOutlet>\n * </SidebarProvider>\n */\nexport function SidebarProvider({\n defaultOpen = true,\n open: openProp,\n onOpenChange: setOpenProp,\n className,\n style,\n children,\n ...props\n}: React.ComponentProps<'div'> & {\n /** Initial open state. Defaults to true */\n defaultOpen?: boolean;\n /** Control the open state yourself */\n open?: boolean;\n /** Callback when sidebar opens/closes */\n onOpenChange?: (open: boolean) => void;\n}) {\n const isMobile = useIsMobile();\n const [openMobile, setOpenMobile] = useState(false);\n\n // This is the internal state of the sidebar.\n // We use openProp and setOpenProp for control from outside the component.\n const [_open, _setOpen] = useState(defaultOpen);\n const open = openProp ?? _open;\n const setOpen = useCallback(\n (value: boolean | ((value: boolean) => boolean)) => {\n const openState = typeof value === 'function' ? value(open) : value;\n if (setOpenProp) {\n setOpenProp(openState);\n } else {\n _setOpen(openState);\n }\n },\n [setOpenProp, open]\n );\n\n // Helper to toggle the sidebar.\n const toggleSidebar = useCallback(() => {\n return isMobile ? setOpenMobile(open => !open) : setOpen(open => !open);\n }, [isMobile, setOpen, setOpenMobile]);\n\n // Adds a keyboard shortcut to toggle the sidebar.\n useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {\n event.preventDefault();\n toggleSidebar();\n }\n };\n\n window.addEventListener('keydown', handleKeyDown);\n return () => window.removeEventListener('keydown', handleKeyDown);\n }, [toggleSidebar]);\n\n // We add a state so that we can do data-state=\"expanded\" or \"collapsed\".\n // This makes it easier to style the sidebar with Tailwind classes.\n const state = open ? 'expanded' : 'collapsed';\n\n const contextValue = useMemo<SidebarContextProps>(\n () => ({\n state,\n open,\n setOpen,\n isMobile,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n }),\n [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]\n );\n\n return (\n <SidebarContext.Provider value={contextValue}>\n <div\n className={classNames(\n 'group/sidebar-wrapper flex w-full has-[[data-variant=inset]]:bg-elevation-1',\n className\n )}\n {...props}\n >\n {children}\n </div>\n </SidebarContext.Provider>\n );\n}\n\n/**\n * The actual sidebar panel. On mobile it becomes a modal dialog.\n */\nexport function Sidebar({\n side = 'left',\n variant = 'sidebar',\n collapsible = 'icon',\n className,\n children,\n ...props\n}: React.ComponentProps<'div'> & {\n /** Where to dock the sidebar. Default: left */\n side?: 'left' | 'right';\n /** Style variant. Default: sidebar */\n variant?: 'sidebar' | 'floating';\n /** How it collapses. Default: offcanvas */\n collapsible?: 'offcanvas' | 'icon' | 'none';\n}) {\n const { isMobile, state, openMobile, setOpenMobile } = useSidebar();\n\n if (collapsible === 'none') {\n return (\n <div\n className={classNames(\n 'flex h-full w-(--sidebar-width) flex-col bg-elevation-1 text-foreground',\n className\n )}\n {...props}\n >\n {children}\n </div>\n );\n }\n\n if (isMobile) {\n return (\n <DialogTrigger isOpen={openMobile} onOpenChange={setOpenMobile} {...props}>\n <DialogOverlay>\n <DialogContent\n data-sidebar=\"sidebar\"\n data-mobile=\"true\"\n className=\"w-(--sidebar-width) max-h-svh overflow-auto p-0 [&>button]:hidden\"\n side=\"left\"\n >\n {() => <div className=\"flex h-full w-full flex-col\">{children}</div>}\n </DialogContent>\n </DialogOverlay>\n </DialogTrigger>\n );\n }\n\n return (\n <div\n className=\"group peer hidden text-foreground md:block\"\n data-state={state}\n data-collapsible={state === 'collapsed' ? collapsible : ''}\n data-variant={variant}\n data-side={side}\n >\n {/* This is what handles the sidebar gap on desktop */}\n <div\n className={classNames(\n 'relative w-(--sidebar-width) bg-elevation-1 transition-[width] duration-200 ease-linear',\n 'group-data-[collapsible=offcanvas]:w-0',\n 'group-data-[side=right]:rotate-180',\n variant === 'floating'\n ? 'group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]'\n : 'group-data-[collapsible=icon]:w-(--sidebar-width-icon)'\n )}\n />\n <div\n className={classNames(\n 'absolute z-10 hidden w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex',\n side === 'left'\n ? 'left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]'\n : 'right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]',\n // Adjust the padding for floating variant.\n variant === 'floating'\n ? 'group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]'\n : 'group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l',\n className\n )}\n {...props}\n >\n <div\n data-sidebar=\"sidebar\"\n className=\"flex h-full w-full flex-col bg-elevation-1 group-data-[variant=floating]:border group-data-[variant=floating]:border-border\"\n >\n {children}\n </div>\n </div>\n </div>\n );\n}\n\n/**\n * Button that toggles the sidebar. Shows arrow icons.\n */\nexport function SidebarTrigger({ className, onClick, ...props }: React.ComponentProps<typeof Button>) {\n const { toggleSidebar, open, isMobile } = useSidebar();\n\n return (\n <Button\n data-sidebar=\"trigger\"\n variant=\"neutral\"\n size=\"icon-sm\"\n className={classNames(className, '!rounded-full')}\n onClick={event => {\n onClick?.(event);\n toggleSidebar();\n }}\n {...props}\n >\n {/* Use transition to rotate a single icon */}\n {isMobile ? <IcMoreHorizontal /> : open ? <IcLeft /> : <IcRight />}\n </Button>\n );\n}\n\n/**\n * Scrollable container for sidebar content\n */\nexport function SidebarContent({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-sidebar=\"content\"\n className={classNames('flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto overflow-x-hidden', className)}\n {...props}\n />\n );\n}\n\n/**\n * Groups related menu items together\n */\nexport function SidebarGroup({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-sidebar=\"group\"\n className={classNames(\n 'relative flex w-full min-w-0 flex-col px-3 group-data-[collapsible=icon]:items-center',\n className\n )}\n {...props}\n />\n );\n}\n\n/**\n * Label for a group.\n */\nexport function SidebarGroupLabel({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-sidebar=\"group-label\"\n className={classNames(\n 'mx-2 mt-2 pt-2 border-t first:border-t-0 flex h-input shrink-0 items-center overflow-hidden text-xs select-none font-medium uppercase text-muted-foreground outline-none ring-ring transition-[height,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-icon [&>svg]:shrink-0',\n 'group-data-[collapsible=icon]:pointer-events-none group-data-[collapsible=icon]:!h-px group-data-[collapsible=icon]:min-h-px group-data-[collapsible=icon]:opacity-100 group-data-[collapsible=icon]:w-6 group-data-[collapsible=icon]:pt-0 group-data-[collapsible=icon]:mb-2 group-data-[collapsible=icon]:first:hidden',\n className\n )}\n {...props}\n />\n );\n}\n\n/**\n * Content wrapper for a group\n */\nexport function SidebarGroupContent({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-sidebar=\"group-content\" className={classNames('w-full body-sm', className)} {...props} />;\n}\n\n/**\n * Container for menu items\n */\nexport function SidebarMenu({ className, ...props }: React.ComponentProps<'ul'>) {\n return <ul data-sidebar=\"menu\" className={classNames('flex w-full min-w-0 flex-col', className)} {...props} />;\n}\n\n/**\n * Single menu item wrapper\n */\nexport function SidebarMenuItem({ className, ...props }: React.ComponentProps<'li'>) {\n return (\n <li\n data-sidebar=\"menu-item\"\n className={classNames(\n 'group/menu-item relative list-none group-data-[collapsible=icon]:[&>*:not([data-sidebar=menu-button])]:hidden',\n className\n )}\n {...props}\n />\n );\n}\n\n/**\n * Extra action button that appears on the right side of menu items\n */\nexport function SidebarMenuAction({\n className,\n ...props\n}: React.ComponentProps<'button'> & {\n /** Only show on hover */\n showOnHover?: boolean;\n}) {\n return (\n <button\n data-sidebar=\"menu-action\"\n className={classNames(\n 'absolute top-0 right-0 btn btn-ghost h-input',\n 'group-data-[collapsible=icon]:hidden',\n className\n )}\n {...props}\n />\n );\n}\n\n/**\n * Shows a number badge on menu items. Auto-formats large numbers.\n */\nexport function SidebarMenuBadge({\n className,\n number,\n ...props\n}: Omit<React.ComponentProps<'div'>, 'children'> & {\n /** The count to display */\n number: number | bigint;\n}) {\n return (\n <div\n data-sidebar=\"menu-badge\"\n className={classNames(\n 'absolute pointer-events-none top-0 right-0 font-light h-input select-none flex items-center justify-center body-sm tabular-nums',\n 'group-data-[collapsible=icon]:hidden',\n className\n )}\n {...props}\n >\n {/* Format the number */}\n {new Intl.NumberFormat(navigator.language, { useGrouping: true }).format(number)}\n </div>\n );\n}\n\n/**\n * Nested submenu container\n */\nexport function SidebarMenuSub({ className, ...props }: React.ComponentProps<'ul'>) {\n return (\n <ul\n data-sidebar=\"menu-sub\"\n className={classNames('ms-2 flex min-w-0 flex-col', 'group-data-[collapsible=icon]:hidden', className)}\n {...props}\n />\n );\n}\n\n/**\n * Submenu item wrapper\n */\nexport function SidebarMenuSubItem({ className, ...props }: React.ComponentProps<'li'>) {\n return <li className={classNames('list-none ms-0', className)} {...props} />;\n}\n\nexport const sidebarMenuButtonClasses =\n 'btn-tab relative rounded-md border-0 justify-start w-full group-data-[collapsible=icon]:justify-center';\n\n// Common interaction logic for SidebarMenuButton and SidebarMenuSubButton\n/**\n * Main menu button. Pass isActive for current page.\n */\nexport function SidebarMenuButton({\n isActive = false,\n className,\n children,\n icon: Icon,\n leading,\n ...props\n}: Omit<React.ComponentProps<typeof Button>, 'children'> & {\n /** Mark as currently active page */\n icon?: CtxIcon;\n leading?: React.ReactNode;\n isActive?: boolean;\n children?: React.ReactNode;\n}) {\n const { isMobile, state } = useSidebar();\n const isCollapsed = !isMobile && state === 'collapsed';\n\n return (\n <TooltipTrigger isDisabled={!isCollapsed}>\n <Button\n size={isCollapsed ? 'icon' : undefined}\n data-sidebar=\"menu-button\"\n {...(isActive && { 'data-selected': true })}\n className={classNames(\n 'peer/menu-button group/active group-has-[[data-sidebar=menu-action]]/menu-item:pr-input',\n sidebarMenuButtonClasses,\n className\n )}\n {...props}\n >\n <span\n aria-hidden\n className=\"absolute inset-y-2 -left-1 w-[7px] rounded-full bg-primary opacity-0 group-data-[selected=true]/active:opacity-100\"\n />\n {leading !== undefined ? leading : Icon ? <Icon /> : null}\n {!isCollapsed && children}\n </Button>\n <Tooltip placement=\"right\">\n <span className=\"flex items-center gap-2\">{children}</span>\n </Tooltip>\n </TooltipTrigger>\n );\n}\n\n/**\n * Button for submenu items\n */\nexport function SidebarMenuSubButton({\n isActive,\n className,\n ...props\n}: React.ComponentProps<'button'> & {\n isActive?: boolean;\n}) {\n return (\n <button\n data-sidebar=\"menu-sub-button\"\n data-active={isActive}\n className={classNames(sidebarMenuButtonClasses, className)}\n {...props}\n />\n );\n}\n\n/**\n * Sticky header at the top of the sidebar. Displays a square logo slot aligned with the outlet header.\n */\nexport function SidebarHeader({\n className,\n logo,\n children,\n showTrigger = true,\n ...props\n}: React.ComponentProps<'div'> & {\n /** Square logo/icon to display */\n logo?: React.ReactNode;\n showTrigger?: boolean;\n}) {\n return (\n <div\n data-sidebar=\"header\"\n className={classNames(\n 'flex items-center h-header select-none shrink-0 border-b px-2 gap-2 group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:px-0',\n className\n )}\n {...props}\n >\n {logo && <div className=\"flex items-center justify-center size-input shrink-0\">{logo}</div>}\n {children && <div className=\"flex-1 min-w-0 group-data-[collapsible=icon]:hidden\">{children}</div>}\n {showTrigger && (\n <SidebarTrigger className={'hidden bg-elevation-1 lg:flex lg:absolute lg:-right-4 lg:z-50'} />\n )}\n </div>\n );\n}\n\nexport function SidebarFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-sidebar=\"footer\"\n className={classNames(\n 'mt-auto flex shrink-0 select-none items-center gap-2 border-t py-2 group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:px-0',\n className\n )}\n {...props}\n />\n );\n}\n\n/**\n *\n * @example Basic usage\n * ```tsx\n * <SidebarOutlet>\n * <SidebarOutletHeader><SidebarTrigger/></SidebarOutletHeader>\n * <SidebarOutletContent><Outlet/></SidebarOutletContent>\n * </SidebarOutlet>\n * ```\n */\nexport function SidebarOutlet({ className, ...props }: React.ComponentProps<'div'>) {\n return <div className={classNames(className, 'flex flex-col flex-1 overflow-auto')} {...props} />;\n}\n\nexport function SidebarOutletContent({ className, ...props }: React.ComponentProps<'div'>) {\n return <div className={classNames(className, 'flex-1 overflow-auto')} {...props} />;\n}\n\nexport function SidebarOutletHeader({ className, ...props }: React.ComponentProps<'nav'>) {\n return (\n <nav className={classNames('flex items-center h-header bg-elevation-1 p-2 border-b', className)} {...props} />\n );\n}\n"],"names":["SIDEBAR_KEYBOARD_SHORTCUT","SidebarContext","createContext","useSidebar","context","use","SidebarProvider","defaultOpen","openProp","setOpenProp","className","style","children","props","isMobile","useIsMobile","openMobile","setOpenMobile","useState","_open","_setOpen","open","setOpen","useCallback","value","openState","toggleSidebar","useEffect","handleKeyDown","event","state","contextValue","useMemo","jsx","classNames","Sidebar","side","variant","collapsible","DialogTrigger","DialogOverlay","DialogContent","jsxs","SidebarTrigger","onClick","Button","IcMoreHorizontal","IcLeft","IcRight","SidebarContent","SidebarGroup","SidebarGroupLabel","SidebarGroupContent","SidebarMenu","SidebarMenuItem","SidebarMenuAction","SidebarMenuBadge","number","SidebarMenuSub","SidebarMenuSubItem","sidebarMenuButtonClasses","SidebarMenuButton","isActive","Icon","leading","isCollapsed","TooltipTrigger","Tooltip","SidebarMenuSubButton","SidebarHeader","logo","showTrigger","SidebarFooter","SidebarOutlet","SidebarOutletContent","SidebarOutletHeader"],"mappings":"qpBASA,MAAMA,EAA4B,IAYrBC,EAAiBC,EAA0C,IAAI,EAMrE,SAASC,GAAa,CACzB,MAAMC,EAAUC,EAAIJ,CAAc,EAClC,GAAI,CAACG,EACD,MAAM,IAAI,MAAM,mDAAmD,EAGvE,OAAOA,CACX,CAcO,SAASE,GAAgB,CAC5B,YAAAC,EAAc,GACd,KAAMC,EACN,aAAcC,EACd,UAAAC,EACA,MAAAC,EACA,SAAAC,EACA,GAAGC,CACP,EAOG,CACC,MAAMC,EAAWC,EAAA,EACX,CAACC,EAAYC,CAAa,EAAIC,EAAS,EAAK,EAI5C,CAACC,EAAOC,CAAQ,EAAIF,EAASX,CAAW,EACxCc,EAAOb,GAAYW,EACnBG,EAAUC,EACXC,GAAmD,CAChD,MAAMC,EAAY,OAAOD,GAAU,WAAaA,EAAMH,CAAI,EAAIG,EAC1Df,EACAA,EAAYgB,CAAS,EAErBL,EAASK,CAAS,CAE1B,EACA,CAAChB,EAAaY,CAAI,CAAA,EAIhBK,EAAgBH,EAAY,IACvBT,EAAWG,EAAcI,GAAQ,CAACA,CAAI,EAAIC,EAAQD,GAAQ,CAACA,CAAI,EACvE,CAACP,EAAUQ,EAASL,CAAa,CAA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D,GAAYqB,EAAC,MAAA,CAAI,UAAU,sDAAuD,SAAArB,EAAS,EAC3F2D,GACGtC,EAACU,EAAA,CAAe,UAAW,+DAAA,CAAiE,CAAA,CAAA,CAAA,CAI5G,CAEO,SAAS6B,GAAc,CAAE,UAAA9D,EAAW,GAAGG,GAAsC,CAChF,OACIoB,EAAC,MAAA,CACG,eAAa,SACb,UAAWC,EACP,qJACAxB,CAAA,EAEH,GAAGG,CAAA,CAAA,CAGhB,CAYO,SAAS4D,GAAc,CAAE,UAAA/D,EAAW,GAAGG,GAAsC,CAChF,OAAOoB,EAAC,OAAI,UAAWC,EAAWxB,EAAW,oCAAoC,EAAI,GAAGG,EAAO,CACnG,CAEO,SAAS6D,GAAqB,CAAE,UAAAhE,EAAW,GAAGG,GAAsC,CACvF,OAAOoB,EAAC,OAAI,UAAWC,EAAWxB,EAAW,sBAAsB,EAAI,GAAGG,EAAO,CACrF,CAEO,SAAS8D,GAAoB,CAAE,UAAAjE,EAAW,GAAGG,GAAsC,CACtF,OACIoB,EAAC,OAAI,UAAWC,EAAW,yDAA0DxB,CAAS,EAAI,GAAGG,EAAO,CAEpH"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cryptlex/web-components",
|
|
3
|
-
"version": "6.6.
|
|
3
|
+
"version": "6.6.98",
|
|
4
4
|
"description": "React component library for Cryptlex web applications",
|
|
5
5
|
"author": "Cryptlex",
|
|
6
6
|
"type": "module",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"*.{ts,tsx,css,scss,json}": "prettier --write"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"@cryptlex/web-api-types": "2.
|
|
51
|
+
"@cryptlex/web-api-types": "2.160.0",
|
|
52
52
|
"@dnd-kit/core": "6.3.1",
|
|
53
53
|
"@dnd-kit/sortable": "10.0.0",
|
|
54
54
|
"@dnd-kit/utilities": "3.2.2",
|