@flytedan/flytebot-design-system 0.96.0 → 0.97.0

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.cts CHANGED
@@ -72,13 +72,13 @@ declare function IconButton({ icon, label, size, variant, tone, round, disabled,
72
72
  type Placement = "bottom-start" | "bottom-end" | "bottom-center" | "top-start" | "top-end" | "top-center";
73
73
  interface PopoverProps {
74
74
  open?: boolean;
75
- anchorRef: React.RefObject<HTMLElement>;
75
+ anchorRef: React.RefObject<HTMLElement | null>;
76
76
  /** The element whose own clicks open and close this popover, when that is more than
77
77
  * the anchor — a form field's label toggles it too, but the surface is positioned
78
78
  * against the input box alone. A pointerdown inside it is not an "outside" press, so
79
79
  * the toggle it is about to run is not undone by a dismissal a moment earlier.
80
80
  * Defaults to `anchorRef`. */
81
- triggerRef?: React.RefObject<HTMLElement>;
81
+ triggerRef?: React.RefObject<HTMLElement | null>;
82
82
  onClose?: () => void;
83
83
  placement?: Placement;
84
84
  offset?: number;
@@ -174,12 +174,12 @@ declare const POPOVER_BODY_MIN = 96;
174
174
  * out of the mounted band, a menu item deleted — and reports it through `onDetach`, so
175
175
  * an anchored layer can never end up pinned to an element that no longer exists.
176
176
  */
177
- declare function usePopoverPosition(open: boolean, anchorRef: React.RefObject<HTMLElement>, opts?: Partial<PopoverProps> & {
177
+ declare function usePopoverPosition(open: boolean, anchorRef: React.RefObject<HTMLElement | null>, opts?: Partial<PopoverProps> & {
178
178
  estHeight?: number;
179
179
  estWidth?: number;
180
180
  onDetach?: () => void;
181
181
  /** The rendered layer, so its real size replaces the estimates once it exists. */
182
- layerRef?: React.RefObject<HTMLElement>;
182
+ layerRef?: React.RefObject<HTMLElement | null>;
183
183
  }): PopoverPosition | null;
184
184
  /**
185
185
  * An anchored floating surface: menus, pickers, disclosure panels, meters.
@@ -200,7 +200,7 @@ declare function usePopoverPosition(open: boolean, anchorRef: React.RefObject<HT
200
200
  * to shrink into the body rather than overflow it — see `.fd-pop-body` in
201
201
  * components.css — so there is only ever one scrollbar.
202
202
  */
203
- declare function Popover({ open, anchorRef, triggerRef, onClose, placement, offset, matchWidth, width, minWidth, maxHeight, padded, role, label, closeOnOutside, closeOnEscape, returnFocus, className, style, title, header, footer, children, id, onPointerEnter, onPointerLeave, onBlur, }: PopoverProps): React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
203
+ declare function Popover({ open, anchorRef, triggerRef, onClose, placement, offset, matchWidth, width, minWidth, maxHeight, padded, role, label, closeOnOutside, closeOnEscape, returnFocus, className, style, title, header, footer, children, id, onPointerEnter, onPointerLeave, onBlur, }: PopoverProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
204
204
  interface MenuItem {
205
205
  id?: string;
206
206
  label?: React.ReactNode;
@@ -740,8 +740,10 @@ interface SidebarNavProps {
740
740
  /** Mobile: slides the off-canvas rail in. */
741
741
  open?: boolean;
742
742
  className?: string;
743
+ /** The rail's `<nav>` element. */
744
+ ref?: React.Ref<HTMLElement>;
743
745
  }
744
- declare const SidebarNav: React.ForwardRefExoticComponent<SidebarNavProps & React.RefAttributes<HTMLElement>>;
746
+ declare function SidebarNav({ brand, groups, current, onNavigate, footer, open, className, ref, ...rest }: SidebarNavProps): React.JSX.Element;
745
747
 
746
748
  /** 60px app header: breadcrumb left, actions right, and a 2px route loader along its top edge. */
747
749
  interface TopbarProps {
@@ -3993,7 +3995,7 @@ declare function ComingSoon({ label, eta, effort, backend, detail, blur, minHeig
3993
3995
  /** "block" wraps a panel; "inline" wraps a single control (button, chip, menu item). */
3994
3996
  variant, onRoadmap,
3995
3997
  /** Flag key. Supplying it AND `canBypass` lets the viewer unblur and use the feature. */
3996
- bypassKey, canBypass, children, className, ...rest }: ComingSoonProps): JSX.Element;
3998
+ bypassKey, canBypass, children, className, ...rest }: ComingSoonProps): React.JSX.Element;
3997
3999
  declare function formatEta(iso?: string | null): string | null;
3998
4000
  declare const FormatEta: typeof formatEta;
3999
4001
 
@@ -5848,7 +5850,7 @@ interface UseResponsiveRailResult {
5848
5850
  overlay: boolean;
5849
5851
  /** Attach to the rail's root DOM node (e.g. `SidebarNav`'s forwarded ref) — required for
5850
5852
  * the focus trap and initial-focus behaviour while the overlay is open. */
5851
- navRef: React.RefObject<HTMLElement>;
5853
+ navRef: React.RefObject<HTMLElement | null>;
5852
5854
  /** The rail's layer. Wrap the rail's content in `StackedLayerProvider` with it, so a menu
5853
5855
  * opened from inside the rail belongs to the rail's focus scope. */
5854
5856
  layer: StackedLayer;
package/dist/index.d.ts CHANGED
@@ -72,13 +72,13 @@ declare function IconButton({ icon, label, size, variant, tone, round, disabled,
72
72
  type Placement = "bottom-start" | "bottom-end" | "bottom-center" | "top-start" | "top-end" | "top-center";
73
73
  interface PopoverProps {
74
74
  open?: boolean;
75
- anchorRef: React.RefObject<HTMLElement>;
75
+ anchorRef: React.RefObject<HTMLElement | null>;
76
76
  /** The element whose own clicks open and close this popover, when that is more than
77
77
  * the anchor — a form field's label toggles it too, but the surface is positioned
78
78
  * against the input box alone. A pointerdown inside it is not an "outside" press, so
79
79
  * the toggle it is about to run is not undone by a dismissal a moment earlier.
80
80
  * Defaults to `anchorRef`. */
81
- triggerRef?: React.RefObject<HTMLElement>;
81
+ triggerRef?: React.RefObject<HTMLElement | null>;
82
82
  onClose?: () => void;
83
83
  placement?: Placement;
84
84
  offset?: number;
@@ -174,12 +174,12 @@ declare const POPOVER_BODY_MIN = 96;
174
174
  * out of the mounted band, a menu item deleted — and reports it through `onDetach`, so
175
175
  * an anchored layer can never end up pinned to an element that no longer exists.
176
176
  */
177
- declare function usePopoverPosition(open: boolean, anchorRef: React.RefObject<HTMLElement>, opts?: Partial<PopoverProps> & {
177
+ declare function usePopoverPosition(open: boolean, anchorRef: React.RefObject<HTMLElement | null>, opts?: Partial<PopoverProps> & {
178
178
  estHeight?: number;
179
179
  estWidth?: number;
180
180
  onDetach?: () => void;
181
181
  /** The rendered layer, so its real size replaces the estimates once it exists. */
182
- layerRef?: React.RefObject<HTMLElement>;
182
+ layerRef?: React.RefObject<HTMLElement | null>;
183
183
  }): PopoverPosition | null;
184
184
  /**
185
185
  * An anchored floating surface: menus, pickers, disclosure panels, meters.
@@ -200,7 +200,7 @@ declare function usePopoverPosition(open: boolean, anchorRef: React.RefObject<HT
200
200
  * to shrink into the body rather than overflow it — see `.fd-pop-body` in
201
201
  * components.css — so there is only ever one scrollbar.
202
202
  */
203
- declare function Popover({ open, anchorRef, triggerRef, onClose, placement, offset, matchWidth, width, minWidth, maxHeight, padded, role, label, closeOnOutside, closeOnEscape, returnFocus, className, style, title, header, footer, children, id, onPointerEnter, onPointerLeave, onBlur, }: PopoverProps): React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
203
+ declare function Popover({ open, anchorRef, triggerRef, onClose, placement, offset, matchWidth, width, minWidth, maxHeight, padded, role, label, closeOnOutside, closeOnEscape, returnFocus, className, style, title, header, footer, children, id, onPointerEnter, onPointerLeave, onBlur, }: PopoverProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
204
204
  interface MenuItem {
205
205
  id?: string;
206
206
  label?: React.ReactNode;
@@ -740,8 +740,10 @@ interface SidebarNavProps {
740
740
  /** Mobile: slides the off-canvas rail in. */
741
741
  open?: boolean;
742
742
  className?: string;
743
+ /** The rail's `<nav>` element. */
744
+ ref?: React.Ref<HTMLElement>;
743
745
  }
744
- declare const SidebarNav: React.ForwardRefExoticComponent<SidebarNavProps & React.RefAttributes<HTMLElement>>;
746
+ declare function SidebarNav({ brand, groups, current, onNavigate, footer, open, className, ref, ...rest }: SidebarNavProps): React.JSX.Element;
745
747
 
746
748
  /** 60px app header: breadcrumb left, actions right, and a 2px route loader along its top edge. */
747
749
  interface TopbarProps {
@@ -3993,7 +3995,7 @@ declare function ComingSoon({ label, eta, effort, backend, detail, blur, minHeig
3993
3995
  /** "block" wraps a panel; "inline" wraps a single control (button, chip, menu item). */
3994
3996
  variant, onRoadmap,
3995
3997
  /** Flag key. Supplying it AND `canBypass` lets the viewer unblur and use the feature. */
3996
- bypassKey, canBypass, children, className, ...rest }: ComingSoonProps): JSX.Element;
3998
+ bypassKey, canBypass, children, className, ...rest }: ComingSoonProps): React.JSX.Element;
3997
3999
  declare function formatEta(iso?: string | null): string | null;
3998
4000
  declare const FormatEta: typeof formatEta;
3999
4001
 
@@ -5848,7 +5850,7 @@ interface UseResponsiveRailResult {
5848
5850
  overlay: boolean;
5849
5851
  /** Attach to the rail's root DOM node (e.g. `SidebarNav`'s forwarded ref) — required for
5850
5852
  * the focus trap and initial-focus behaviour while the overlay is open. */
5851
- navRef: React.RefObject<HTMLElement>;
5853
+ navRef: React.RefObject<HTMLElement | null>;
5852
5854
  /** The rail's layer. Wrap the rail's content in `StackedLayerProvider` with it, so a menu
5853
5855
  * opened from inside the rail belongs to the rail's focus scope. */
5854
5856
  layer: StackedLayer;