@nulogy/components 14.8.1 → 15.0.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.
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ declare const _default: {
3
+ title: string;
4
+ parameters: {
5
+ layout: string;
6
+ };
7
+ };
8
+ export default _default;
9
+ export declare const NoPageTitle: () => React.JSX.Element;
10
+ export declare const NoBreadcrumbs: () => React.JSX.Element;
11
+ export declare const WithFullHeight: () => React.JSX.Element;
@@ -6,5 +6,5 @@ type TooltipProps = {
6
6
  sideOffset?: number;
7
7
  delayDuration?: number;
8
8
  };
9
- export declare function Tooltip({ children, content, sideOffset, hideTooltip, delayDuration }: TooltipProps): React.JSX.Element;
9
+ export declare function MiniTooltip({ children, content, sideOffset, hideTooltip, delayDuration, }: TooltipProps): React.JSX.Element;
10
10
  export {};
@@ -1,6 +1,7 @@
1
1
  import React from "react";
2
2
  export interface FeatureFlags {
3
3
  experimentalDesktopTypographyScale?: boolean;
4
+ navigationV3?: boolean;
4
5
  }
5
6
  export interface FeatureFlagsContextValue {
6
7
  featureFlags: FeatureFlags;
@@ -6,5 +6,3 @@ export declare const UserMenuLink: import("styled-components/dist/types").IStyle
6
6
  export declare const UserMenuTrigger: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<RadixNavigationMenu.NavigationMenuTriggerProps & import("react").RefAttributes<HTMLButtonElement>, {
7
7
  $isMobile?: boolean;
8
8
  }>> & string & Omit<import("react").ForwardRefExoticComponent<RadixNavigationMenu.NavigationMenuTriggerProps & import("react").RefAttributes<HTMLButtonElement>>, keyof import("react").Component<any, {}, any>>;
9
- export declare const SubMenuContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<RadixNavigationMenu.NavigationMenuContentProps & import("react").RefAttributes<HTMLDivElement>, never>> & string & Omit<import("react").ForwardRefExoticComponent<RadixNavigationMenu.NavigationMenuContentProps & import("react").RefAttributes<HTMLDivElement>>, keyof import("react").Component<any, {}, any>>;
10
- export declare const SubMenuList: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<RadixNavigationMenu.NavigationMenuListProps & import("react").RefAttributes<HTMLUListElement>, never>> & string & Omit<import("react").ForwardRefExoticComponent<RadixNavigationMenu.NavigationMenuListProps & import("react").RefAttributes<HTMLUListElement>>, keyof import("react").Component<any, {}, any>>;
@@ -27,7 +27,6 @@ interface ButtonUserMenuItem {
27
27
  label: string;
28
28
  type: "button";
29
29
  props?: React.ComponentPropsWithoutRef<"button">;
30
- items?: UserMenuItem[];
31
30
  }
32
31
  interface CustomUserMenuItem {
33
32
  type: "custom";
@@ -1,13 +1,19 @@
1
1
  import React from "react";
2
+ import { MaxWidthProps } from "styled-system";
2
3
  export type TooltipProps = {
4
+ /** Delay before showing (in ms) */
3
5
  showDelay?: string | number;
4
- hideDelay?: string | number;
6
+ /** Whether the tooltip is open by default */
5
7
  defaultOpen?: boolean;
8
+ /** Tooltip placement relative to the trigger */
9
+ placement?: "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end";
10
+ /** Maximum width for the tooltip box */
11
+ maxWidth?: MaxWidthProps["maxWidth"];
12
+ /** Additional CSS class for styling */
6
13
  className?: string;
14
+ /** The content to display inside the tooltip */
7
15
  tooltip?: React.ReactNode;
8
- placement?: "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end";
9
- maxWidth?: string;
16
+ /** Child element that triggers the tooltip */
10
17
  children?: React.ReactNode;
11
18
  };
12
- declare const Tooltip: React.ForwardRefExoticComponent<TooltipProps & React.RefAttributes<React.Ref<unknown>>>;
13
- export default Tooltip;
19
+ export default function Tooltip({ showDelay, defaultOpen, placement, maxWidth, className, tooltip, children, }: TooltipProps): React.JSX.Element;
@@ -45,12 +45,6 @@ export declare const WithCustomShowDelay: {
45
45
  name: string;
46
46
  };
47
47
  };
48
- export declare const WithCustomHideDelay: {
49
- (): React.JSX.Element;
50
- story: {
51
- name: string;
52
- };
53
- };
54
48
  export declare const WithOtherFocusableElements: {
55
49
  (): React.JSX.Element;
56
50
  story: {
@@ -64,5 +58,4 @@ export declare const OpenByDefault: {
64
58
  };
65
59
  };
66
60
  export declare const WithCustomComponent: () => React.JSX.Element;
67
- export declare const WithRef: () => React.JSX.Element;
68
61
  export declare const WithCustomTooltip: () => React.JSX.Element;
@@ -0,0 +1,8 @@
1
+ type Side = "top" | "bottom" | "left" | "right";
2
+ type Alignment = ("start" | "end" | "center") | undefined;
3
+ type PlacementProps = {
4
+ side: Side;
5
+ align: Alignment;
6
+ };
7
+ export declare function getPlacementProps(placement: string): PlacementProps;
8
+ export {};
@@ -1,14 +1,24 @@
1
- import React, { PropsWithChildren } from "react";
2
- import { MaxWidthProps } from "styled-system";
3
- export type MaybeTooltipProps = PropsWithChildren<{
1
+ import React from "react";
2
+ export type MaybeTooltipProps = {
3
+ /** The content to display inside the tooltip */
4
4
  tooltip: React.ReactNode;
5
+ /** Whether to enable the tooltip at all */
5
6
  showTooltip?: boolean;
6
- placement?: "top" | "bottom" | "left" | "right";
7
+ /** Tooltip placement relative to trigger element */
8
+ placement?: "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end";
9
+ /** CSS class for the tooltip content */
7
10
  className?: string;
11
+ /** Whether tooltip is open by default */
8
12
  defaultOpen?: boolean;
13
+ /** Delay before showing the tooltip (ms) */
9
14
  showDelay?: number;
10
- maxWidth?: MaxWidthProps["maxWidth"];
15
+ /** Maximum width for tooltip box */
16
+ maxWidth?: string;
17
+ /** Allow opening tooltip on mobile tap (not supported by new Tooltip) */
11
18
  supportMobileTap?: boolean;
12
- }>;
13
- declare function MaybeTooltip({ tooltip, children, placement, defaultOpen, showDelay, maxWidth, showTooltip, supportMobileTap, className, }: MaybeTooltipProps): React.JSX.Element;
19
+ /** The trigger element(s) */
20
+ children?: React.ReactNode;
21
+ };
22
+ declare function MaybeTooltip({ tooltip, showTooltip, placement, defaultOpen, showDelay, maxWidth, supportMobileTap, // Note: supportMobileTap is handled internally by the new Tooltip
23
+ className, children, }: MaybeTooltipProps): React.JSX.Element;
14
24
  export default MaybeTooltip;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nulogy/components",
3
- "version": "14.8.1",
3
+ "version": "15.0.0",
4
4
  "description": "Component library for the Nulogy Design System - http://nulogy.design",
5
5
  "private": false,
6
6
  "publishConfig": {
@@ -1,8 +0,0 @@
1
- import React from "react";
2
- import * as RadixTooltip from "@radix-ui/react-tooltip";
3
- type MaybeTooltipProps = React.ComponentProps<typeof RadixTooltip.Root> & {
4
- tooltip: React.ReactNode;
5
- showTooltip?: boolean;
6
- };
7
- declare const MaybeTooltip: ({ children, tooltip, showTooltip, ...rest }: MaybeTooltipProps) => React.JSX.Element;
8
- export default MaybeTooltip;
@@ -1,7 +0,0 @@
1
- import React from "react";
2
- import * as RadixTooltip from "@radix-ui/react-tooltip";
3
- type StyledTooltipContentProps = React.ComponentProps<typeof RadixTooltip.Content> & {
4
- children: React.ReactNode;
5
- };
6
- declare const StyledTooltipContent: ({ children, ...props }: StyledTooltipContentProps) => React.JSX.Element;
7
- export default StyledTooltipContent;