@scripso-homepad/ui 0.4.34 → 0.4.36

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.
@@ -29500,6 +29500,62 @@ function AppHeader({
29500
29500
  }
29501
29501
  );
29502
29502
  }
29503
+ function SidebarCollapseIcon({
29504
+ className,
29505
+ size = 20,
29506
+ strokeWidth = 2
29507
+ }) {
29508
+ return /* @__PURE__ */ jsxRuntime.jsx(
29509
+ "svg",
29510
+ {
29511
+ width: size,
29512
+ height: size,
29513
+ viewBox: "0 0 20 20",
29514
+ fill: "none",
29515
+ xmlns: "http://www.w3.org/2000/svg",
29516
+ "aria-hidden": true,
29517
+ className,
29518
+ children: /* @__PURE__ */ jsxRuntime.jsx(
29519
+ "path",
29520
+ {
29521
+ d: "M12.5 2.5V17.5M8.33333 12.5L5.83333 10L8.33333 7.5M4.16667 2.5H15.8333C16.7538 2.5 17.5 3.24619 17.5 4.16667V15.8333C17.5 16.7538 16.7538 17.5 15.8333 17.5H4.16667C3.24619 17.5 2.5 16.7538 2.5 15.8333V4.16667C2.5 3.24619 3.24619 2.5 4.16667 2.5Z",
29522
+ stroke: "currentColor",
29523
+ strokeWidth,
29524
+ strokeLinecap: "round",
29525
+ strokeLinejoin: "round"
29526
+ }
29527
+ )
29528
+ }
29529
+ );
29530
+ }
29531
+ function SidebarExpandIcon({
29532
+ className,
29533
+ size = 20,
29534
+ strokeWidth = 2
29535
+ }) {
29536
+ return /* @__PURE__ */ jsxRuntime.jsx(
29537
+ "svg",
29538
+ {
29539
+ width: size,
29540
+ height: size,
29541
+ viewBox: "0 0 20 20",
29542
+ fill: "none",
29543
+ xmlns: "http://www.w3.org/2000/svg",
29544
+ "aria-hidden": true,
29545
+ className,
29546
+ children: /* @__PURE__ */ jsxRuntime.jsx(
29547
+ "path",
29548
+ {
29549
+ d: "M12.5 2.5V17.5M6.66667 7.5L9.16667 10L6.66667 12.5M4.16667 2.5H15.8333C16.7538 2.5 17.5 3.24619 17.5 4.16667V15.8333C17.5 16.7538 16.7538 17.5 15.8333 17.5H4.16667C3.24619 17.5 2.5 16.7538 2.5 15.8333V4.16667C2.5 3.24619 3.24619 2.5 4.16667 2.5Z",
29550
+ stroke: "currentColor",
29551
+ strokeWidth,
29552
+ strokeLinecap: "round",
29553
+ strokeLinejoin: "round"
29554
+ }
29555
+ )
29556
+ }
29557
+ );
29558
+ }
29503
29559
  function useMediaQuery(query) {
29504
29560
  const [matches, setMatches] = react.useState(() => {
29505
29561
  if (typeof window === "undefined") {
@@ -29848,7 +29904,7 @@ function Sidebar({
29848
29904
  onClick: handleHeaderAction,
29849
29905
  className: "shrink-0 cursor-pointer text-white transition-[opacity,transform] duration-200 hover:opacity-80 active:scale-95",
29850
29906
  "aria-label": isDesktop ? isExpanded ? labels.collapse : labels.expand : labels.closeMenu,
29851
- children: isDesktop ? isExpanded ? collapseIcon ?? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.PanelLeftClose, { size: 20, strokeWidth: 1.75 }) : expandIcon ?? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.PanelLeftOpen, { size: 20, strokeWidth: 1.75 }) : closeIcon ?? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { size: 20, strokeWidth: 1.75 })
29907
+ children: isDesktop ? isExpanded ? collapseIcon ?? /* @__PURE__ */ jsxRuntime.jsx(SidebarCollapseIcon, {}) : expandIcon ?? /* @__PURE__ */ jsxRuntime.jsx(SidebarExpandIcon, {}) : closeIcon ?? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { size: 20, strokeWidth: 1.75 })
29852
29908
  }
29853
29909
  )
29854
29910
  ]
@@ -30622,6 +30678,7 @@ function TableActionsMenu({
30622
30678
  triggerAriaLabel,
30623
30679
  className,
30624
30680
  menuClassName,
30681
+ triggerIcon,
30625
30682
  menuWidth = MENU_WIDTH_PX,
30626
30683
  menuFitContent = true
30627
30684
  }) {
@@ -30718,12 +30775,22 @@ function TableActionsMenu({
30718
30775
  item.onSelect();
30719
30776
  },
30720
30777
  className: cn(
30721
- "flex h-[51px] w-full cursor-pointer items-center gap-2.5 px-3 text-left typography-14 font-medium text-storm-gray-900 transition-colors hover:bg-storm-gray-0",
30778
+ "flex h-[51px] w-full cursor-pointer items-center gap-2.5 px-3 text-left typography-14 font-medium transition-colors hover:bg-storm-gray-0",
30722
30779
  index > 0 && "border-t border-storm-gray-50",
30723
- item.disabled && "cursor-not-allowed opacity-50"
30780
+ item.disabled && "cursor-not-allowed opacity-50",
30781
+ item.tone === "danger" ? "text-[#AE0011]" : item.tone === "success" ? "text-green-600" : "text-storm-gray-900"
30724
30782
  ),
30725
30783
  children: [
30726
- icon ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex size-5 shrink-0 items-center justify-center text-storm-gray-200", children: icon }) : null,
30784
+ icon ? /* @__PURE__ */ jsxRuntime.jsx(
30785
+ "span",
30786
+ {
30787
+ className: cn(
30788
+ "inline-flex size-5 shrink-0 items-center justify-center",
30789
+ item.tone === "danger" ? "text-[#AE0011]" : item.tone === "success" ? "text-green-600" : "text-storm-gray-200"
30790
+ ),
30791
+ children: icon
30792
+ }
30793
+ ) : null,
30727
30794
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "whitespace-nowrap", children: item.label })
30728
30795
  ]
30729
30796
  },
@@ -30738,7 +30805,7 @@ function TableActionsMenu({
30738
30805
  {
30739
30806
  ref: triggerRef,
30740
30807
  variant: "menu",
30741
- icon: /* @__PURE__ */ jsxRuntime.jsx(TableMoreIcon, { className: "size-5" }),
30808
+ icon: triggerIcon ?? /* @__PURE__ */ jsxRuntime.jsx(TableMoreIcon, { className: "size-5" }),
30742
30809
  ariaLabel: triggerAriaLabel,
30743
30810
  onClick: () => setOpen((current) => !current),
30744
30811
  "aria-expanded": open,
@@ -31888,6 +31955,8 @@ exports.HistoryTimeline = HistoryTimeline;
31888
31955
  exports.Modal = Modal;
31889
31956
  exports.Pagination = Pagination;
31890
31957
  exports.Sidebar = Sidebar;
31958
+ exports.SidebarCollapseIcon = SidebarCollapseIcon;
31959
+ exports.SidebarExpandIcon = SidebarExpandIcon;
31891
31960
  exports.SidebarMobileHeader = SidebarMobileHeader;
31892
31961
  exports.SidebarNavItem = SidebarNavItem;
31893
31962
  exports.SidebarUserCard = SidebarUserCard;