@hilum/ui 3.3.0 → 3.3.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hilum/ui",
3
- "version": "3.3.0",
3
+ "version": "3.3.2",
4
4
  "private": false,
5
5
  "description": "Hilum UI — design system primitives (Button, Input, Dialog, Combobox, …) + tokens + fonts + icons",
6
6
  "license": "MIT",
@@ -59,6 +59,10 @@ function useSidebar() {
59
59
  return ctx;
60
60
  }
61
61
 
62
+ function useOptionalSidebar() {
63
+ return React.useContext(SidebarContext);
64
+ }
65
+
62
66
  /* ------------------------------------------------------------------ */
63
67
  /* SidebarProvider */
64
68
  /* ------------------------------------------------------------------ */
@@ -496,7 +500,7 @@ function SidebarMenuButton({
496
500
  data-size={size}
497
501
  className={cn(
498
502
  // Base
499
- "peer/menu-button flex min-h-10 w-full items-center gap-2 overflow-hidden rounded-md p-2 body-sm text-left",
503
+ "peer/menu-button flex min-h-8 w-full items-center gap-2 overflow-hidden rounded-md px-2 py-1.5 body-sm text-left",
500
504
  "outline-none ring-ring",
501
505
  "transition-[width,height,padding] duration-150",
502
506
  "hover:bg-muted hover:text-foreground",
@@ -723,5 +727,6 @@ export {
723
727
  SIDEBAR_WIDTH,
724
728
  SIDEBAR_WIDTH_ICON,
725
729
  SIDEBAR_WIDTH_MOBILE,
730
+ useOptionalSidebar,
726
731
  useSidebar,
727
732
  };