@hyphen/hyphen-components 5.3.0 → 5.4.1

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.
@@ -12,6 +12,7 @@ declare function useSidebar(): SidebarContextProps;
12
12
  declare const SidebarProvider: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
13
13
  defaultOpen?: boolean | undefined;
14
14
  open?: boolean | undefined;
15
+ storageKey?: string | undefined;
15
16
  onOpenChange?: ((open: boolean) => void) | undefined;
16
17
  }, "ref"> & React.RefAttributes<HTMLDivElement>>;
17
18
  declare const Sidebar: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
@@ -28,7 +29,7 @@ declare const SidebarMenuItem: React.ForwardRefExoticComponent<Omit<React.Detail
28
29
  declare const SidebarMenuButton: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement> & {
29
30
  asChild?: boolean | undefined;
30
31
  isActive?: boolean | undefined;
31
- icon?: "code" | "link" | "menu" | "search" | "circle" | "filter" | "key" | "add" | "alarm-disable" | "alarm" | "analytics" | "app-window" | "arrow-down" | "arrow-left" | "arrow-right" | "arrow-up" | "arrows-maximize" | "at" | "ban" | "block" | "blocks" | "book-open" | "c-add" | "c-check" | "c-delete" | "c-in-progress" | "c-info" | "c-question" | "c-remove" | "c-warning" | "calendar-create" | "calendar" | "camera" | "caret-down" | "caret-left" | "caret-right" | "caret-sm-down" | "caret-sm-left" | "caret-sm-right" | "caret-sm-up" | "caret-up-down" | "caret-up" | "chart-bar" | "chart-line" | "chat" | "check" | "checkbox-btn-checked" | "checkbox-btn-indeterminate" | "checkbox-btn" | "circle-filled" | "clipboard" | "cloud" | "command-line" | "contact" | "copy-document" | "dashboard" | "database" | "dock-left" | "document" | "dots" | "download" | "electricity-bolt" | "exclamation-mark" | "eye-slash" | "eye" | "flag" | "folder" | "gear" | "grab" | "hash-mark" | "heart-o" | "heart" | "home" | "info" | "integrations" | "launch-app" | "lightbulb" | "list" | "lock" | "logo-deploy" | "logo-env" | "logo-link" | "logo-netinfo" | "logo-toggle" | "logout" | "mail" | "minus" | "moon" | "paperclip" | "path-intersect" | "pause" | "pc" | "pencil" | "phone" | "photo" | "play" | "qr-code" | "radio-btn-checked" | "radio-btn-unchecked" | "refresh" | "remove" | "rewind" | "send" | "settings" | "skip" | "stack" | "star-o" | "star" | "stopwatch" | "subtract" | "sun" | "t-warning" | "tag" | "terminal" | "time-alarm" | "time-clock" | "trash" | "unlocked" | "upload" | "user-create" | "user" | "users" | "wifi-off" | "wifi" | "zoom-in" | "zoom-out" | undefined;
32
+ icon?: "code" | "link" | "menu" | "search" | "circle" | "filter" | "key" | "add" | "alarm-disable" | "alarm" | "analytics" | "app-window" | "arrow-down" | "arrow-left" | "arrow-right" | "arrow-up" | "arrows-maximize" | "at" | "ban" | "block" | "blocks" | "book-open" | "c-add" | "c-check" | "c-delete" | "c-in-progress" | "c-info" | "c-question" | "c-remove" | "c-user" | "c-warning" | "calendar-create" | "calendar" | "camera" | "caret-down" | "caret-left" | "caret-right" | "caret-sm-down" | "caret-sm-left" | "caret-sm-right" | "caret-sm-up" | "caret-up-down" | "caret-up" | "chart-bar" | "chart-line" | "chat" | "check" | "checkbox-btn-checked" | "checkbox-btn-indeterminate" | "checkbox-btn" | "circle-filled" | "clipboard" | "cloud" | "command-line" | "contact" | "copy-document" | "dashboard" | "database" | "dock-left" | "document" | "dots" | "download" | "electricity-bolt" | "exclamation-mark" | "eye-slash" | "eye" | "flag" | "folder" | "gear" | "grab" | "hash-mark" | "heart-o" | "heart" | "home" | "info" | "integrations" | "launch-app" | "lightbulb" | "list" | "lock" | "logo-deploy" | "logo-env" | "logo-link" | "logo-netinfo" | "logo-toggle" | "logout" | "mail" | "minus" | "moon" | "paperclip" | "path-intersect" | "pause" | "pc" | "pencil" | "phone" | "photo" | "play" | "qr-code" | "radio-btn-checked" | "radio-btn-unchecked" | "refresh" | "remove" | "rewind" | "send" | "settings" | "skip" | "stack" | "star-o" | "star" | "stopwatch" | "subtract" | "sun" | "t-warning" | "tag" | "terminal" | "time-alarm" | "time-clock" | "trash" | "unlocked" | "upload" | "user-create" | "user" | "users" | "wifi-off" | "wifi" | "zoom-in" | "zoom-out" | undefined;
32
33
  tooltip?: string | (Omit<import("@radix-ui/react-tooltip").TooltipContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>) | undefined;
33
34
  }, "ref"> & React.RefAttributes<HTMLButtonElement>>;
34
35
  declare const SidebarGroup: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -3,7 +3,7 @@
3
3
  \***************************************************************************************************************************/
4
4
  /**
5
5
  * Do not edit directly
6
- * Generated on Sat, 05 Apr 2025 18:09:56 GMT
6
+ * Generated on Mon, 07 Jul 2025 16:27:29 GMT
7
7
  */
8
8
 
9
9
  .font-family-monospace { font-family: var(--assets-font-family-monospace); }
@@ -3,7 +3,7 @@
3
3
  \*********************************************************************************************************************/
4
4
  /**
5
5
  * Do not edit directly
6
- * Generated on Sat, 05 Apr 2025 18:09:55 GMT
6
+ * Generated on Mon, 07 Jul 2025 16:27:29 GMT
7
7
  */
8
8
 
9
9
  :root {
@@ -352,7 +352,7 @@
352
352
  \*******************************************************************************************************************************/
353
353
  /**
354
354
  * Do not edit directly
355
- * Generated on Sat, 05 Apr 2025 18:09:55 GMT
355
+ * Generated on Mon, 07 Jul 2025 16:27:29 GMT
356
356
  */
357
357
 
358
358
  :root.dark {
@@ -4024,7 +4024,7 @@ var TooltipContent = /*#__PURE__*/React__namespace.forwardRef(function (_ref, re
4024
4024
  });
4025
4025
  TooltipContent.displayName = TooltipPrimitive__namespace.Content.displayName;
4026
4026
 
4027
- var _excluded$3 = ["defaultOpen", "open", "onOpenChange", "className", "style", "children"],
4027
+ var _excluded$3 = ["defaultOpen", "open", "storageKey", "onOpenChange", "className", "style", "children"],
4028
4028
  _excluded2 = ["side", "collapsible", "className", "children"],
4029
4029
  _excluded3 = ["className", "onClick"],
4030
4030
  _excluded4 = ["className"],
@@ -4041,8 +4041,6 @@ var _excluded$3 = ["defaultOpen", "open", "onOpenChange", "className", "style",
4041
4041
  _excluded13 = ["className", "asChild"],
4042
4042
  _excluded14 = ["className"],
4043
4043
  _excluded15 = ["className"];
4044
- var SIDEBAR_COOKIE_NAME = 'sidebar_expanded';
4045
- var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
4046
4044
  var SIDEBAR_WIDTH = '16rem';
4047
4045
  var SIDEBAR_WIDTH_ICON = '44px';
4048
4046
  var SIDEBAR_KEYBOARD_SHORTCUT = '[';
@@ -4058,6 +4056,8 @@ var SidebarProvider = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
4058
4056
  var _ref$defaultOpen = _ref.defaultOpen,
4059
4057
  defaultOpen = _ref$defaultOpen === void 0 ? true : _ref$defaultOpen,
4060
4058
  openProp = _ref.open,
4059
+ _ref$storageKey = _ref.storageKey,
4060
+ storageKey = _ref$storageKey === void 0 ? 'sidebar_expanded' : _ref$storageKey,
4061
4061
  setOpenProp = _ref.onOpenChange,
4062
4062
  className = _ref.className,
4063
4063
  style = _ref.style,
@@ -4090,8 +4090,7 @@ var SidebarProvider = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
4090
4090
  } else {
4091
4091
  _setOpen(newOpenState);
4092
4092
  }
4093
- // Set cookie only if state changes
4094
- document.cookie = SIDEBAR_COOKIE_NAME + "=" + newOpenState + "; path=/; max-age=" + SIDEBAR_COOKIE_MAX_AGE;
4093
+ localStorage.setItem(storageKey, "" + newOpenState);
4095
4094
  }
4096
4095
  }, [setOpenProp, open]);
4097
4096
  // Toggle sidebar based on screen type