@mirror-physics/fractal-ui 0.2.0-next.80 → 0.2.0-next.82

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
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { HTMLAttributes, ReactNode, CSSProperties } from 'react';
2
+ import { HTMLAttributes, ReactNode, CSSProperties, ReactElement } from 'react';
3
3
  import { ClassValue } from 'clsx';
4
4
  export { ColumnEditor, ColumnEditorItem, ColumnEditorProps } from './column-editor.cjs';
5
5
 
@@ -700,4 +700,19 @@ declare function useEscapeDismiss(priority: number, handler: () => void, enabled
700
700
 
701
701
  declare function cn(...inputs: ClassValue[]): string;
702
702
 
703
- export { Alert, AlertDescription, AlertGhost, AlertTitle, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonColor, ButtonGhost, type ButtonGhostProps, type ButtonProps, type ButtonSize, type ButtonType, Card, CardContent, CardDescription, CardFooter, CardGhost, type CardGhostProps, CardHeader, CardTitle, Checkbox, CheckboxGhost, type CheckboxProps, Chip, ChipGhost, type ChipProps, type ChipTone, CodeBlock, type CodeBlockProps, ContentSwitcher, ContentSwitcherGhost, type ContentSwitcherItem, type ContentSwitcherProps, type ControlSize, ConversationGhost, type ConversationGhostProps, DataTable, type DataTableColumn, DataTableGhost, type DataTableGhostProps, type DataTableProps, Disclosure, DisclosureGhost, type DisclosureProps, Dropdown, DropdownGhost, type DropdownItem, type DropdownProps, FeatureCard, type FeatureCardProps, FileDropzone, FileDropzoneGhost, type FileDropzoneProps, FolderCard, type FolderCardProps, type FormFieldGhostProps, Ghost, GhostLine, type GhostLineProps, type GhostProps, Input, InputGhost, type InputProps, Label, LabelGhost, type LabelProps, LatticeLoader, type LatticeLoaderProps, Link, LinkGhost, type LinkProps, type LinkSize, type LinkTheme, Modal, ModalGhost, type ModalProps, NumberInput, type NumberInputProps, Pagination, PaginationGhost, type PaginationProps, PasswordInput, type PasswordInputProps, PromptCard, PromptCardGhost, type PromptCardProps, type PromptCardTone, PromptGrid, type PromptGridProps, Radio, type RadioProps, type RangeSliderProps, SidePanel, SidePanelGhost, type SidePanelProps, Sidebar, SidebarAccountMenu, type SidebarAccountMenuProps, SidebarBrand, SidebarFooter, SidebarGhost, type SidebarGhostProps, SidebarHeader, SidebarNav, SidebarNavItem, type SidebarNavItemProps, type SidebarProps, SidebarSection, type SingleSliderProps, Slider, type SliderProps, type SortDirection, SortableTable, type SortableTableColumn, type SortableTableDefaultSort, SortableTableGhost, type SortableTablePagination, type SortableTableProps, type SortableTableRowAction, type SortableTableSelection, type SurfaceGhostProps, type TabItem, type TableColumnSizing, type TableLayoutProps, type TableOverflowMenuConfig, type TableOverflowMenuItem, TableSearch, type TableSearchProps, type TableSearchType, Tabs, TabsGhost, type TabsProps, type TabsVariant, TextButton, TextButtonGhost, type TextButtonIconPosition, type TextButtonProps, type TextButtonSize, type TextButtonTone, Textarea, TextareaGhost, type TextareaProps, Toast, type ToastPosition, type ToastProps, type ToastVariant, ToastViewport, type ToastViewportProps, Toggle, ToggleGhost, type ToggleProps, UILoader, type UILoaderProps, type UILoaderTone, cn, useEscapeDismiss };
703
+ interface TooltipProps {
704
+ /** Supplementary, non-interactive help. Keep essential instructions visible. */
705
+ content: ReactNode;
706
+ /** One focusable element that forwards its props and ref (for example Button). */
707
+ children: ReactElement;
708
+ placement?: 'top' | 'right' | 'bottom' | 'left';
709
+ maxWidth?: number | string;
710
+ /** Delay before opening on hover, in milliseconds. Keyboard focus is immediate. */
711
+ delay?: number;
712
+ disabled?: boolean;
713
+ className?: string;
714
+ }
715
+ /** Hover/focus help with a portal, viewport collision handling and Escape dismissal. */
716
+ declare function Tooltip({ content, children, placement, maxWidth, delay, disabled, className, }: TooltipProps): React.JSX.Element;
717
+
718
+ export { Alert, AlertDescription, AlertGhost, AlertTitle, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonColor, ButtonGhost, type ButtonGhostProps, type ButtonProps, type ButtonSize, type ButtonType, Card, CardContent, CardDescription, CardFooter, CardGhost, type CardGhostProps, CardHeader, CardTitle, Checkbox, CheckboxGhost, type CheckboxProps, Chip, ChipGhost, type ChipProps, type ChipTone, CodeBlock, type CodeBlockProps, ContentSwitcher, ContentSwitcherGhost, type ContentSwitcherItem, type ContentSwitcherProps, type ControlSize, ConversationGhost, type ConversationGhostProps, DataTable, type DataTableColumn, DataTableGhost, type DataTableGhostProps, type DataTableProps, Disclosure, DisclosureGhost, type DisclosureProps, Dropdown, DropdownGhost, type DropdownItem, type DropdownProps, FeatureCard, type FeatureCardProps, FileDropzone, FileDropzoneGhost, type FileDropzoneProps, FolderCard, type FolderCardProps, type FormFieldGhostProps, Ghost, GhostLine, type GhostLineProps, type GhostProps, Input, InputGhost, type InputProps, Label, LabelGhost, type LabelProps, LatticeLoader, type LatticeLoaderProps, Link, LinkGhost, type LinkProps, type LinkSize, type LinkTheme, Modal, ModalGhost, type ModalProps, NumberInput, type NumberInputProps, Pagination, PaginationGhost, type PaginationProps, PasswordInput, type PasswordInputProps, PromptCard, PromptCardGhost, type PromptCardProps, type PromptCardTone, PromptGrid, type PromptGridProps, Radio, type RadioProps, type RangeSliderProps, SidePanel, SidePanelGhost, type SidePanelProps, Sidebar, SidebarAccountMenu, type SidebarAccountMenuProps, SidebarBrand, SidebarFooter, SidebarGhost, type SidebarGhostProps, SidebarHeader, SidebarNav, SidebarNavItem, type SidebarNavItemProps, type SidebarProps, SidebarSection, type SingleSliderProps, Slider, type SliderProps, type SortDirection, SortableTable, type SortableTableColumn, type SortableTableDefaultSort, SortableTableGhost, type SortableTablePagination, type SortableTableProps, type SortableTableRowAction, type SortableTableSelection, type SurfaceGhostProps, type TabItem, type TableColumnSizing, type TableLayoutProps, type TableOverflowMenuConfig, type TableOverflowMenuItem, TableSearch, type TableSearchProps, type TableSearchType, Tabs, TabsGhost, type TabsProps, type TabsVariant, TextButton, TextButtonGhost, type TextButtonIconPosition, type TextButtonProps, type TextButtonSize, type TextButtonTone, Textarea, TextareaGhost, type TextareaProps, Toast, type ToastPosition, type ToastProps, type ToastVariant, ToastViewport, type ToastViewportProps, Toggle, ToggleGhost, type ToggleProps, Tooltip, type TooltipProps, UILoader, type UILoaderProps, type UILoaderTone, cn, useEscapeDismiss };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { HTMLAttributes, ReactNode, CSSProperties } from 'react';
2
+ import { HTMLAttributes, ReactNode, CSSProperties, ReactElement } from 'react';
3
3
  import { ClassValue } from 'clsx';
4
4
  export { ColumnEditor, ColumnEditorItem, ColumnEditorProps } from './column-editor.js';
5
5
 
@@ -700,4 +700,19 @@ declare function useEscapeDismiss(priority: number, handler: () => void, enabled
700
700
 
701
701
  declare function cn(...inputs: ClassValue[]): string;
702
702
 
703
- export { Alert, AlertDescription, AlertGhost, AlertTitle, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonColor, ButtonGhost, type ButtonGhostProps, type ButtonProps, type ButtonSize, type ButtonType, Card, CardContent, CardDescription, CardFooter, CardGhost, type CardGhostProps, CardHeader, CardTitle, Checkbox, CheckboxGhost, type CheckboxProps, Chip, ChipGhost, type ChipProps, type ChipTone, CodeBlock, type CodeBlockProps, ContentSwitcher, ContentSwitcherGhost, type ContentSwitcherItem, type ContentSwitcherProps, type ControlSize, ConversationGhost, type ConversationGhostProps, DataTable, type DataTableColumn, DataTableGhost, type DataTableGhostProps, type DataTableProps, Disclosure, DisclosureGhost, type DisclosureProps, Dropdown, DropdownGhost, type DropdownItem, type DropdownProps, FeatureCard, type FeatureCardProps, FileDropzone, FileDropzoneGhost, type FileDropzoneProps, FolderCard, type FolderCardProps, type FormFieldGhostProps, Ghost, GhostLine, type GhostLineProps, type GhostProps, Input, InputGhost, type InputProps, Label, LabelGhost, type LabelProps, LatticeLoader, type LatticeLoaderProps, Link, LinkGhost, type LinkProps, type LinkSize, type LinkTheme, Modal, ModalGhost, type ModalProps, NumberInput, type NumberInputProps, Pagination, PaginationGhost, type PaginationProps, PasswordInput, type PasswordInputProps, PromptCard, PromptCardGhost, type PromptCardProps, type PromptCardTone, PromptGrid, type PromptGridProps, Radio, type RadioProps, type RangeSliderProps, SidePanel, SidePanelGhost, type SidePanelProps, Sidebar, SidebarAccountMenu, type SidebarAccountMenuProps, SidebarBrand, SidebarFooter, SidebarGhost, type SidebarGhostProps, SidebarHeader, SidebarNav, SidebarNavItem, type SidebarNavItemProps, type SidebarProps, SidebarSection, type SingleSliderProps, Slider, type SliderProps, type SortDirection, SortableTable, type SortableTableColumn, type SortableTableDefaultSort, SortableTableGhost, type SortableTablePagination, type SortableTableProps, type SortableTableRowAction, type SortableTableSelection, type SurfaceGhostProps, type TabItem, type TableColumnSizing, type TableLayoutProps, type TableOverflowMenuConfig, type TableOverflowMenuItem, TableSearch, type TableSearchProps, type TableSearchType, Tabs, TabsGhost, type TabsProps, type TabsVariant, TextButton, TextButtonGhost, type TextButtonIconPosition, type TextButtonProps, type TextButtonSize, type TextButtonTone, Textarea, TextareaGhost, type TextareaProps, Toast, type ToastPosition, type ToastProps, type ToastVariant, ToastViewport, type ToastViewportProps, Toggle, ToggleGhost, type ToggleProps, UILoader, type UILoaderProps, type UILoaderTone, cn, useEscapeDismiss };
703
+ interface TooltipProps {
704
+ /** Supplementary, non-interactive help. Keep essential instructions visible. */
705
+ content: ReactNode;
706
+ /** One focusable element that forwards its props and ref (for example Button). */
707
+ children: ReactElement;
708
+ placement?: 'top' | 'right' | 'bottom' | 'left';
709
+ maxWidth?: number | string;
710
+ /** Delay before opening on hover, in milliseconds. Keyboard focus is immediate. */
711
+ delay?: number;
712
+ disabled?: boolean;
713
+ className?: string;
714
+ }
715
+ /** Hover/focus help with a portal, viewport collision handling and Escape dismissal. */
716
+ declare function Tooltip({ content, children, placement, maxWidth, delay, disabled, className, }: TooltipProps): React.JSX.Element;
717
+
718
+ export { Alert, AlertDescription, AlertGhost, AlertTitle, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonColor, ButtonGhost, type ButtonGhostProps, type ButtonProps, type ButtonSize, type ButtonType, Card, CardContent, CardDescription, CardFooter, CardGhost, type CardGhostProps, CardHeader, CardTitle, Checkbox, CheckboxGhost, type CheckboxProps, Chip, ChipGhost, type ChipProps, type ChipTone, CodeBlock, type CodeBlockProps, ContentSwitcher, ContentSwitcherGhost, type ContentSwitcherItem, type ContentSwitcherProps, type ControlSize, ConversationGhost, type ConversationGhostProps, DataTable, type DataTableColumn, DataTableGhost, type DataTableGhostProps, type DataTableProps, Disclosure, DisclosureGhost, type DisclosureProps, Dropdown, DropdownGhost, type DropdownItem, type DropdownProps, FeatureCard, type FeatureCardProps, FileDropzone, FileDropzoneGhost, type FileDropzoneProps, FolderCard, type FolderCardProps, type FormFieldGhostProps, Ghost, GhostLine, type GhostLineProps, type GhostProps, Input, InputGhost, type InputProps, Label, LabelGhost, type LabelProps, LatticeLoader, type LatticeLoaderProps, Link, LinkGhost, type LinkProps, type LinkSize, type LinkTheme, Modal, ModalGhost, type ModalProps, NumberInput, type NumberInputProps, Pagination, PaginationGhost, type PaginationProps, PasswordInput, type PasswordInputProps, PromptCard, PromptCardGhost, type PromptCardProps, type PromptCardTone, PromptGrid, type PromptGridProps, Radio, type RadioProps, type RangeSliderProps, SidePanel, SidePanelGhost, type SidePanelProps, Sidebar, SidebarAccountMenu, type SidebarAccountMenuProps, SidebarBrand, SidebarFooter, SidebarGhost, type SidebarGhostProps, SidebarHeader, SidebarNav, SidebarNavItem, type SidebarNavItemProps, type SidebarProps, SidebarSection, type SingleSliderProps, Slider, type SliderProps, type SortDirection, SortableTable, type SortableTableColumn, type SortableTableDefaultSort, SortableTableGhost, type SortableTablePagination, type SortableTableProps, type SortableTableRowAction, type SortableTableSelection, type SurfaceGhostProps, type TabItem, type TableColumnSizing, type TableLayoutProps, type TableOverflowMenuConfig, type TableOverflowMenuItem, TableSearch, type TableSearchProps, type TableSearchType, Tabs, TabsGhost, type TabsProps, type TabsVariant, TextButton, TextButtonGhost, type TextButtonIconPosition, type TextButtonProps, type TextButtonSize, type TextButtonTone, Textarea, TextareaGhost, type TextareaProps, Toast, type ToastPosition, type ToastProps, type ToastVariant, ToastViewport, type ToastViewportProps, Toggle, ToggleGhost, type ToggleProps, Tooltip, type TooltipProps, UILoader, type UILoaderProps, type UILoaderTone, cn, useEscapeDismiss };
package/dist/index.js CHANGED
@@ -2968,6 +2968,35 @@ function Pagination({
2968
2968
  ] })
2969
2969
  ] });
2970
2970
  }
2971
+
2972
+ // src/components/Tooltip/Tooltip.tsx
2973
+ import * as TooltipPrimitive from "@radix-ui/react-tooltip";
2974
+ import { jsx as jsx36, jsxs as jsxs31 } from "react/jsx-runtime";
2975
+ function Tooltip({
2976
+ content,
2977
+ children,
2978
+ placement = "bottom",
2979
+ maxWidth = 320,
2980
+ delay = 0,
2981
+ disabled = false,
2982
+ className
2983
+ }) {
2984
+ if (disabled || content == null || content === "") return children;
2985
+ return /* @__PURE__ */ jsx36(TooltipPrimitive.Provider, { delayDuration: delay, children: /* @__PURE__ */ jsxs31(TooltipPrimitive.Root, { children: [
2986
+ /* @__PURE__ */ jsx36(TooltipPrimitive.Trigger, { asChild: true, children }),
2987
+ /* @__PURE__ */ jsx36(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx36(
2988
+ TooltipPrimitive.Content,
2989
+ {
2990
+ side: placement,
2991
+ sideOffset: 8,
2992
+ collisionPadding: 8,
2993
+ className: cn("fractal-tooltip", className),
2994
+ style: { "--tooltip-max-width": typeof maxWidth === "number" ? `${maxWidth}px` : maxWidth },
2995
+ children: content
2996
+ }
2997
+ ) })
2998
+ ] }) });
2999
+ }
2971
3000
  export {
2972
3001
  Alert,
2973
3002
  AlertDescription,
@@ -3046,6 +3075,7 @@ export {
3046
3075
  ToastViewport,
3047
3076
  Toggle,
3048
3077
  ToggleGhost,
3078
+ Tooltip,
3049
3079
  UILoader,
3050
3080
  cn,
3051
3081
  useEscapeDismiss