@storm-ds/ui 1.0.3 → 1.0.5

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/index.d.mts CHANGED
@@ -448,10 +448,10 @@ interface ToggleGroupItemProps extends React.ButtonHTMLAttributes<HTMLButtonElem
448
448
  declare const ToggleGroupItem: react.ForwardRefExoticComponent<ToggleGroupItemProps & react.RefAttributes<HTMLButtonElement>>;
449
449
 
450
450
  declare const sideStyles$1: {
451
- readonly left: "inset-y-0 left-0 border-r border-storm-border data-[open]:animate-in data-[open]:slide-in-from-left";
452
- readonly right: "inset-y-0 right-0 border-l border-storm-border data-[open]:animate-in data-[open]:slide-in-from-right";
453
- readonly top: "inset-x-0 top-0 border-b border-storm-border data-[open]:animate-in data-[open]:slide-in-from-top";
454
- readonly bottom: "inset-x-0 bottom-0 border-t border-storm-border data-[open]:animate-in data-[open]:slide-in-from-bottom";
451
+ readonly left: "inset-y-0 left-0 h-full border-r border-storm-border open:animate-in open:slide-in-from-left";
452
+ readonly right: "inset-y-0 right-0 h-full border-l border-storm-border open:animate-in open:slide-in-from-right";
453
+ readonly top: "inset-x-0 top-0 w-full border-b border-storm-border open:animate-in open:slide-in-from-top";
454
+ readonly bottom: "inset-x-0 bottom-0 w-full border-t border-storm-border open:animate-in open:slide-in-from-bottom";
455
455
  };
456
456
  interface SheetProps extends React.DialogHTMLAttributes<HTMLDialogElement> {
457
457
  side?: keyof typeof sideStyles$1;
package/dist/index.d.ts CHANGED
@@ -448,10 +448,10 @@ interface ToggleGroupItemProps extends React.ButtonHTMLAttributes<HTMLButtonElem
448
448
  declare const ToggleGroupItem: react.ForwardRefExoticComponent<ToggleGroupItemProps & react.RefAttributes<HTMLButtonElement>>;
449
449
 
450
450
  declare const sideStyles$1: {
451
- readonly left: "inset-y-0 left-0 border-r border-storm-border data-[open]:animate-in data-[open]:slide-in-from-left";
452
- readonly right: "inset-y-0 right-0 border-l border-storm-border data-[open]:animate-in data-[open]:slide-in-from-right";
453
- readonly top: "inset-x-0 top-0 border-b border-storm-border data-[open]:animate-in data-[open]:slide-in-from-top";
454
- readonly bottom: "inset-x-0 bottom-0 border-t border-storm-border data-[open]:animate-in data-[open]:slide-in-from-bottom";
451
+ readonly left: "inset-y-0 left-0 h-full border-r border-storm-border open:animate-in open:slide-in-from-left";
452
+ readonly right: "inset-y-0 right-0 h-full border-l border-storm-border open:animate-in open:slide-in-from-right";
453
+ readonly top: "inset-x-0 top-0 w-full border-b border-storm-border open:animate-in open:slide-in-from-top";
454
+ readonly bottom: "inset-x-0 bottom-0 w-full border-t border-storm-border open:animate-in open:slide-in-from-bottom";
455
455
  };
456
456
  interface SheetProps extends React.DialogHTMLAttributes<HTMLDialogElement> {
457
457
  side?: keyof typeof sideStyles$1;
package/dist/index.js CHANGED
@@ -451,7 +451,9 @@ var InputGroup = _react.forwardRef.call(void 0,
451
451
  "[&>*:first-child]:rounded-l-storm-md [&>*:first-child]:rounded-r-none",
452
452
  "[&>*:last-child]:rounded-r-storm-md [&>*:last-child]:rounded-l-none",
453
453
  "[&>*:not(:first-child):not(:last-child)]:rounded-none",
454
- "[&>*:not(:first-child)]:-ml-0.5",
454
+ "[&>*]:relative",
455
+ "[&>*:not(:first-child)]:-ml-px",
456
+ "[&>*:focus-within]:z-10 [&>*:focus]:z-10",
455
457
  className
456
458
  ),
457
459
  ...props
@@ -497,13 +499,13 @@ var Alert = _react.forwardRef.call(void 0,
497
499
  role: "alert",
498
500
  className: cn(
499
501
  "relative w-full rounded-storm-md p-4",
500
- icon ? "flex gap-3" : "",
502
+ icon ? "flex items-start gap-3" : "",
501
503
  variantStyles3[variant],
502
504
  className
503
505
  ),
504
506
  ...props,
505
507
  children: [
506
- icon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "shrink-0 [&>svg]:h-5 [&>svg]:w-5", children: icon }),
508
+ icon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "mt-0.5 shrink-0 [&>svg]:h-5 [&>svg]:w-5", children: icon }),
507
509
  icon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1", children }) : children
508
510
  ]
509
511
  }
@@ -1773,10 +1775,10 @@ ToggleGroupItem.displayName = "ToggleGroupItem";
1773
1775
 
1774
1776
 
1775
1777
  var sideStyles2 = {
1776
- left: "inset-y-0 left-0 border-r border-storm-border data-[open]:animate-in data-[open]:slide-in-from-left",
1777
- right: "inset-y-0 right-0 border-l border-storm-border data-[open]:animate-in data-[open]:slide-in-from-right",
1778
- top: "inset-x-0 top-0 border-b border-storm-border data-[open]:animate-in data-[open]:slide-in-from-top",
1779
- bottom: "inset-x-0 bottom-0 border-t border-storm-border data-[open]:animate-in data-[open]:slide-in-from-bottom"
1778
+ left: "inset-y-0 left-0 h-full border-r border-storm-border open:animate-in open:slide-in-from-left",
1779
+ right: "inset-y-0 right-0 h-full border-l border-storm-border open:animate-in open:slide-in-from-right",
1780
+ top: "inset-x-0 top-0 w-full border-b border-storm-border open:animate-in open:slide-in-from-top",
1781
+ bottom: "inset-x-0 bottom-0 w-full border-t border-storm-border open:animate-in open:slide-in-from-bottom"
1780
1782
  };
1781
1783
  var sizeMap = {
1782
1784
  left: { sm: "w-64", md: "w-80", lg: "w-96", xl: "w-[480px]", full: "w-screen" },
@@ -1791,7 +1793,7 @@ var Sheet = _react.forwardRef.call(void 0,
1791
1793
  {
1792
1794
  ref,
1793
1795
  className: cn(
1794
- "fixed z-50 m-0 bg-storm-background p-0 text-storm-foreground backdrop:bg-black/50",
1796
+ "fixed z-50 m-0 max-h-none max-w-none bg-storm-background p-0 text-storm-foreground backdrop:bg-black/50",
1795
1797
  sideStyles2[side],
1796
1798
  sizeMap[side][size],
1797
1799
  className
@@ -3526,7 +3528,7 @@ function DataTableInner({ className, columns, data, pageSize = 10, searchable =
3526
3528
  setPage(0);
3527
3529
  },
3528
3530
  placeholder: searchPlaceholder,
3529
- className: "h-9 w-full max-w-sm rounded-storm-md border border-storm-border bg-storm-background px-3 text-sm text-storm-foreground placeholder:text-storm-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-storm-ring"
3531
+ className: "h-9 w-full rounded-storm-md border border-storm-border bg-storm-background px-3 text-sm text-storm-foreground placeholder:text-storm-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-storm-ring"
3530
3532
  }
3531
3533
  ),
3532
3534
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rounded-storm-md border border-storm-border overflow-hidden", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "table", { className: "w-full caption-bottom text-sm", children: [
@@ -3616,9 +3618,9 @@ var StormSidebar = _react.forwardRef.call(void 0,
3616
3618
  "data-side": side,
3617
3619
  "data-collapsed": collapsed ? "" : void 0,
3618
3620
  className: cn(
3619
- "flex flex-col border-storm-border bg-storm-background transition-[width] duration-200",
3621
+ "flex shrink-0 flex-col border-storm-border bg-storm-background overflow-hidden transition-[width] duration-200",
3620
3622
  side === "left" ? "border-r" : "border-l order-last",
3621
- collapsed ? "w-16" : "w-64",
3623
+ collapsed ? "w-14" : "w-64",
3622
3624
  className
3623
3625
  ),
3624
3626
  ...props,
@@ -3628,19 +3630,65 @@ var StormSidebar = _react.forwardRef.call(void 0,
3628
3630
  }
3629
3631
  );
3630
3632
  var SidebarHeader = _react.forwardRef.call(void 0,
3631
- ({ className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ref, className: cn("flex items-center h-14 px-4 border-b border-storm-border shrink-0", className), ...props })
3633
+ ({ className, ...props }, ref) => {
3634
+ const { collapsed } = useSidebar();
3635
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3636
+ "div",
3637
+ {
3638
+ ref,
3639
+ className: cn(
3640
+ "flex items-center h-14 border-b border-storm-border shrink-0",
3641
+ collapsed ? "justify-center px-0" : "gap-3 px-4",
3642
+ className
3643
+ ),
3644
+ ...props
3645
+ }
3646
+ );
3647
+ }
3632
3648
  );
3633
3649
  var SidebarContent = _react.forwardRef.call(void 0,
3634
- ({ className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ref, className: cn("flex-1 overflow-y-auto px-3 py-4 space-y-4", className), ...props })
3650
+ ({ className, ...props }, ref) => {
3651
+ const { collapsed } = useSidebar();
3652
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3653
+ "div",
3654
+ {
3655
+ ref,
3656
+ className: cn(
3657
+ "flex-1 overflow-y-auto py-4 space-y-4",
3658
+ collapsed ? "px-2" : "px-3",
3659
+ className
3660
+ ),
3661
+ ...props
3662
+ }
3663
+ );
3664
+ }
3635
3665
  );
3636
3666
  var SidebarFooter = _react.forwardRef.call(void 0,
3637
- ({ className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ref, className: cn("flex items-center px-4 py-3 border-t border-storm-border shrink-0", className), ...props })
3667
+ ({ className, children, ...props }, ref) => {
3668
+ const { collapsed } = useSidebar();
3669
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3670
+ "div",
3671
+ {
3672
+ ref,
3673
+ className: cn(
3674
+ "flex items-center py-3 border-t border-storm-border shrink-0",
3675
+ collapsed ? "justify-center px-2" : "px-4",
3676
+ className
3677
+ ),
3678
+ ...props,
3679
+ children: !collapsed && children
3680
+ }
3681
+ );
3682
+ }
3638
3683
  );
3639
3684
  var SidebarGroup = _react.forwardRef.call(void 0,
3640
- ({ className, label, children, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { ref, className: cn("space-y-1", className), ...props, children: [
3641
- label && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "px-3 mb-1 text-[11px] font-semibold uppercase tracking-wider text-storm-muted-foreground", children: label }),
3642
- children
3643
- ] })
3685
+ ({ className, label, children, ...props }, ref) => {
3686
+ const { collapsed } = useSidebar();
3687
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { ref, className: cn("space-y-1", className), ...props, children: [
3688
+ label && !collapsed && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "px-3 mb-1 text-[11px] font-semibold uppercase tracking-wider text-storm-muted-foreground", children: label }),
3689
+ children
3690
+ ] });
3691
+ }
3644
3692
  );
3645
3693
  var SidebarItem = _react.forwardRef.call(void 0,
3646
3694
  ({ className, active, icon, children, ...props }, ref) => {
@@ -3651,9 +3699,9 @@ var SidebarItem = _react.forwardRef.call(void 0,
3651
3699
  ref,
3652
3700
  "data-active": active ? "" : void 0,
3653
3701
  className: cn(
3654
- "flex items-center gap-3 rounded-storm-sm px-3 py-2 text-sm cursor-pointer transition-colors",
3702
+ "flex items-center rounded-storm-sm py-2 text-sm cursor-pointer transition-colors",
3655
3703
  active ? "bg-storm-muted text-storm-foreground font-medium" : "text-storm-muted-foreground hover:text-storm-foreground hover:bg-storm-muted/50",
3656
- collapsed && "justify-center px-0",
3704
+ collapsed ? "justify-center px-2" : "gap-3 px-3",
3657
3705
  className
3658
3706
  ),
3659
3707
  ...props,