@particle-academy/react-fancy 1.3.4 → 1.4.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.cjs +71 -29
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +71 -29
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -571,8 +571,11 @@ interface CalloutProps {
|
|
|
571
571
|
|
|
572
572
|
declare const Callout: react.ForwardRefExoticComponent<CalloutProps & react.RefAttributes<HTMLDivElement>>;
|
|
573
573
|
|
|
574
|
+
type TimelineOrientation = "vertical" | "horizontal";
|
|
574
575
|
interface TimelineProps {
|
|
575
576
|
children: ReactNode;
|
|
577
|
+
/** Layout direction. Default: "vertical" */
|
|
578
|
+
orientation?: TimelineOrientation;
|
|
576
579
|
className?: string;
|
|
577
580
|
}
|
|
578
581
|
interface TimelineItemProps {
|
|
@@ -1975,7 +1978,7 @@ declare function cn(...inputs: ClassValue[]): string;
|
|
|
1975
1978
|
|
|
1976
1979
|
declare function useControllableState<T>(controlledValue: T | undefined, defaultValue: T, onChange?: (value: T) => void): [T, (value: T | ((prev: T) => T)) => void];
|
|
1977
1980
|
|
|
1978
|
-
declare function useOutsideClick(ref: RefObject<HTMLElement | null>, handler: (event: MouseEvent | TouchEvent) => void, enabled?: boolean): void;
|
|
1981
|
+
declare function useOutsideClick(ref: RefObject<HTMLElement | null>, handler: (event: MouseEvent | TouchEvent) => void, enabled?: boolean, ignoreRef?: RefObject<HTMLElement | null>): void;
|
|
1979
1982
|
|
|
1980
1983
|
declare function useEscapeKey(handler: () => void, enabled?: boolean): void;
|
|
1981
1984
|
|
|
@@ -2037,4 +2040,4 @@ declare function find(char: string): {
|
|
|
2037
2040
|
category: string;
|
|
2038
2041
|
} | undefined;
|
|
2039
2042
|
|
|
2040
|
-
export { Accordion, type AccordionContentProps, type AccordionContextValue, type AccordionItemProps, type AccordionProps, type AccordionTriggerProps, Action, type ActionColor, type ActionProps, type AffixPosition, Autocomplete, type AutocompleteOption, type AutocompleteProps, Avatar, type AvatarProps, Badge, type BadgeProps, Brand, type BrandProps, Breadcrumbs, type BreadcrumbsItemProps, type BreadcrumbsProps, Calendar, type CalendarMode, type CalendarProps, Callout, type CalloutProps, Canvas, type CanvasContextValue, type CanvasControlsProps, type CanvasEdgeProps, type CanvasMinimapProps, type CanvasNodeProps, type CanvasProps, Card, type CardBodyProps, type CardFooterProps, type CardHeaderProps, type CardProps, Carousel, type CarouselContextValue, type CarouselControlsProps, type CarouselPanelsProps, type CarouselProps, type CarouselSlideProps, type CarouselStepsProps, type CarouselVariant, Chart, type ChartAreaProps, type ChartBarData, type ChartBarProps, type ChartCommonProps, type ChartDonutData, type ChartDonutProps, type ChartHorizontalBarProps, type ChartLineProps, type ChartPieData, type ChartPieProps, type ChartSeries, type ChartSparklineProps, type ChartStackedBarProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, type Color, ColorPicker, type ColorPickerProps, Command, type CommandContextValue, type CommandEmptyProps, type CommandGroupProps, type CommandInputProps, type CommandItemProps, type CommandListProps, type CommandProps, Composer, type ComposerProps, ContentRenderer, type ContentRendererProps, ContextMenu, type ContextMenuContentProps, type ContextMenuContextValue, type ContextMenuItemProps, type ContextMenuProps, type ContextMenuSeparatorProps, type ContextMenuTriggerProps, DatePicker, type DatePickerProps, type DateRange, Diagram, type DiagramContextValue, type DiagramEntityData, type DiagramEntityProps, type DiagramFieldData, type DiagramFieldProps, type DiagramProps, type DiagramRelationData, type DiagramRelationProps, type DiagramSchema, type DiagramToolbarProps, type DiagramType, Dropdown, type DropdownContextValue, type DropdownItemProps, type DropdownItemsProps, type DropdownProps, type DropdownSeparatorProps, type DropdownTriggerProps, EMOJI_DATA, EMOJI_ENTRIES, type EdgeAnchor, Editor, type EditorAction, type EditorContentProps, type EditorContextValue, type EditorProps, type EditorToolbarProps, Emoji, type EmojiProps, EmojiSelect, type EmojiSelectProps, type ExportFormat, Field, type FieldProps, FileUpload, type FileUploadContextValue, type FileUploadDropzoneProps, type FileUploadListProps, type FileUploadProps, Heading, type HeadingProps, Icon, type IconProps, type IconSet, Input, type InputAffixProps, type InputBaseProps, type InputOption, type InputOptionGroup, type InputProps, Kanban, type KanbanCardProps, type KanbanColumnProps, type KanbanContextValue, type KanbanProps, Menu, type MenuContextValue, type MenuGroupProps, type MenuItemProps, type MenuOrientation, type MenuProps, type MenuSubmenuProps, MobileMenu, type MobileMenuBottomBarProps, type MobileMenuContextValue, type MobileMenuFlyoutProps, type MobileMenuItemProps, type MobileMenuSide, type MobileMenuVariant, Modal, type ModalBodyProps, type ModalContextValue, type ModalFooterProps, type ModalHeaderProps, type ModalProps, MultiSwitch, type MultiSwitchProps, Navbar, type NavbarBrandProps, type NavbarContextValue, type NavbarItemProps, type NavbarItemsProps, type NavbarProps, type NavbarToggleProps, type NodeRect, OtpInput, type OtpInputProps, Pagination, type PaginationProps, Pillbox, type PillboxProps, type Placement, Popover, type PopoverContentProps, type PopoverContextValue, type PopoverProps, type PopoverTriggerProps, Portal, type PortalProps, Profile, type ProfileProps, Progress, type ProgressProps, RadioGroup, type RadioGroupProps, type RelationType, type RenderExtension, type RenderExtensionProps, Select, type SelectProps, Separator, type SeparatorProps, Sidebar, type SidebarCollapseMode, type SidebarContextValue, type SidebarGroupProps, type SidebarItemProps, type SidebarProps, type SidebarSubmenuProps, type SidebarToggleProps, type Size, Skeleton, type SkeletonProps, Slider, type SliderProps, Switch, type SwitchProps, Table, type TableBodyProps, type TableCellProps, type TableColumnProps, type TableHeadProps, type TablePaginationProps, type TableProps, type TableRowProps, type TableRowTrayProps, type TableSearchProps, type TableTrayProps, Tabs, type TabsContextValue, type TabsListProps, type TabsPanelProps, type TabsPanelsProps, type TabsProps, type TabsTabProps, type TabsVariant, Text, type TextProps, Textarea, type TextareaProps, TimePicker, type TimePickerProps, Timeline, type TimelineBlockProps, type TimelineItemProps, type TimelineProps, Toast, type ToastContextValue, type ToastData, type ToastPosition, type ToastProviderProps, type ToastVariant, Tooltip, type TooltipProps, type Variant, type ViewportState, cn, configureIcons, find, registerExtension, registerExtensions, registerIconSet, resolve, search, useAccordion, useAnimation, useCanvas, useCarousel, useCommand, useContextMenu, useControllableState, useDiagram, useDropdown, useEditor, useEscapeKey, useFileUpload, useFloatingPosition, useFocusTrap, useId, useKanban, useMenu, useMobileMenu, useModal, useNavbar, useNodeRegistry, useOutsideClick, usePanZoom, usePopover, useSidebar, useTabs, useToast };
|
|
2043
|
+
export { Accordion, type AccordionContentProps, type AccordionContextValue, type AccordionItemProps, type AccordionProps, type AccordionTriggerProps, Action, type ActionColor, type ActionProps, type AffixPosition, Autocomplete, type AutocompleteOption, type AutocompleteProps, Avatar, type AvatarProps, Badge, type BadgeProps, Brand, type BrandProps, Breadcrumbs, type BreadcrumbsItemProps, type BreadcrumbsProps, Calendar, type CalendarMode, type CalendarProps, Callout, type CalloutProps, Canvas, type CanvasContextValue, type CanvasControlsProps, type CanvasEdgeProps, type CanvasMinimapProps, type CanvasNodeProps, type CanvasProps, Card, type CardBodyProps, type CardFooterProps, type CardHeaderProps, type CardProps, Carousel, type CarouselContextValue, type CarouselControlsProps, type CarouselPanelsProps, type CarouselProps, type CarouselSlideProps, type CarouselStepsProps, type CarouselVariant, Chart, type ChartAreaProps, type ChartBarData, type ChartBarProps, type ChartCommonProps, type ChartDonutData, type ChartDonutProps, type ChartHorizontalBarProps, type ChartLineProps, type ChartPieData, type ChartPieProps, type ChartSeries, type ChartSparklineProps, type ChartStackedBarProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, type Color, ColorPicker, type ColorPickerProps, Command, type CommandContextValue, type CommandEmptyProps, type CommandGroupProps, type CommandInputProps, type CommandItemProps, type CommandListProps, type CommandProps, Composer, type ComposerProps, ContentRenderer, type ContentRendererProps, ContextMenu, type ContextMenuContentProps, type ContextMenuContextValue, type ContextMenuItemProps, type ContextMenuProps, type ContextMenuSeparatorProps, type ContextMenuTriggerProps, DatePicker, type DatePickerProps, type DateRange, Diagram, type DiagramContextValue, type DiagramEntityData, type DiagramEntityProps, type DiagramFieldData, type DiagramFieldProps, type DiagramProps, type DiagramRelationData, type DiagramRelationProps, type DiagramSchema, type DiagramToolbarProps, type DiagramType, Dropdown, type DropdownContextValue, type DropdownItemProps, type DropdownItemsProps, type DropdownProps, type DropdownSeparatorProps, type DropdownTriggerProps, EMOJI_DATA, EMOJI_ENTRIES, type EdgeAnchor, Editor, type EditorAction, type EditorContentProps, type EditorContextValue, type EditorProps, type EditorToolbarProps, Emoji, type EmojiProps, EmojiSelect, type EmojiSelectProps, type ExportFormat, Field, type FieldProps, FileUpload, type FileUploadContextValue, type FileUploadDropzoneProps, type FileUploadListProps, type FileUploadProps, Heading, type HeadingProps, Icon, type IconProps, type IconSet, Input, type InputAffixProps, type InputBaseProps, type InputOption, type InputOptionGroup, type InputProps, Kanban, type KanbanCardProps, type KanbanColumnProps, type KanbanContextValue, type KanbanProps, Menu, type MenuContextValue, type MenuGroupProps, type MenuItemProps, type MenuOrientation, type MenuProps, type MenuSubmenuProps, MobileMenu, type MobileMenuBottomBarProps, type MobileMenuContextValue, type MobileMenuFlyoutProps, type MobileMenuItemProps, type MobileMenuSide, type MobileMenuVariant, Modal, type ModalBodyProps, type ModalContextValue, type ModalFooterProps, type ModalHeaderProps, type ModalProps, MultiSwitch, type MultiSwitchProps, Navbar, type NavbarBrandProps, type NavbarContextValue, type NavbarItemProps, type NavbarItemsProps, type NavbarProps, type NavbarToggleProps, type NodeRect, OtpInput, type OtpInputProps, Pagination, type PaginationProps, Pillbox, type PillboxProps, type Placement, Popover, type PopoverContentProps, type PopoverContextValue, type PopoverProps, type PopoverTriggerProps, Portal, type PortalProps, Profile, type ProfileProps, Progress, type ProgressProps, RadioGroup, type RadioGroupProps, type RelationType, type RenderExtension, type RenderExtensionProps, Select, type SelectProps, Separator, type SeparatorProps, Sidebar, type SidebarCollapseMode, type SidebarContextValue, type SidebarGroupProps, type SidebarItemProps, type SidebarProps, type SidebarSubmenuProps, type SidebarToggleProps, type Size, Skeleton, type SkeletonProps, Slider, type SliderProps, Switch, type SwitchProps, Table, type TableBodyProps, type TableCellProps, type TableColumnProps, type TableHeadProps, type TablePaginationProps, type TableProps, type TableRowProps, type TableRowTrayProps, type TableSearchProps, type TableTrayProps, Tabs, type TabsContextValue, type TabsListProps, type TabsPanelProps, type TabsPanelsProps, type TabsProps, type TabsTabProps, type TabsVariant, Text, type TextProps, Textarea, type TextareaProps, TimePicker, type TimePickerProps, Timeline, type TimelineBlockProps, type TimelineItemProps, type TimelineOrientation, type TimelineProps, Toast, type ToastContextValue, type ToastData, type ToastPosition, type ToastProviderProps, type ToastVariant, Tooltip, type TooltipProps, type Variant, type ViewportState, cn, configureIcons, find, registerExtension, registerExtensions, registerIconSet, resolve, search, useAccordion, useAnimation, useCanvas, useCarousel, useCommand, useContextMenu, useControllableState, useDiagram, useDropdown, useEditor, useEscapeKey, useFileUpload, useFloatingPosition, useFocusTrap, useId, useKanban, useMenu, useMobileMenu, useModal, useNavbar, useNodeRegistry, useOutsideClick, usePanZoom, usePopover, useSidebar, useTabs, useToast };
|
package/dist/index.d.ts
CHANGED
|
@@ -571,8 +571,11 @@ interface CalloutProps {
|
|
|
571
571
|
|
|
572
572
|
declare const Callout: react.ForwardRefExoticComponent<CalloutProps & react.RefAttributes<HTMLDivElement>>;
|
|
573
573
|
|
|
574
|
+
type TimelineOrientation = "vertical" | "horizontal";
|
|
574
575
|
interface TimelineProps {
|
|
575
576
|
children: ReactNode;
|
|
577
|
+
/** Layout direction. Default: "vertical" */
|
|
578
|
+
orientation?: TimelineOrientation;
|
|
576
579
|
className?: string;
|
|
577
580
|
}
|
|
578
581
|
interface TimelineItemProps {
|
|
@@ -1975,7 +1978,7 @@ declare function cn(...inputs: ClassValue[]): string;
|
|
|
1975
1978
|
|
|
1976
1979
|
declare function useControllableState<T>(controlledValue: T | undefined, defaultValue: T, onChange?: (value: T) => void): [T, (value: T | ((prev: T) => T)) => void];
|
|
1977
1980
|
|
|
1978
|
-
declare function useOutsideClick(ref: RefObject<HTMLElement | null>, handler: (event: MouseEvent | TouchEvent) => void, enabled?: boolean): void;
|
|
1981
|
+
declare function useOutsideClick(ref: RefObject<HTMLElement | null>, handler: (event: MouseEvent | TouchEvent) => void, enabled?: boolean, ignoreRef?: RefObject<HTMLElement | null>): void;
|
|
1979
1982
|
|
|
1980
1983
|
declare function useEscapeKey(handler: () => void, enabled?: boolean): void;
|
|
1981
1984
|
|
|
@@ -2037,4 +2040,4 @@ declare function find(char: string): {
|
|
|
2037
2040
|
category: string;
|
|
2038
2041
|
} | undefined;
|
|
2039
2042
|
|
|
2040
|
-
export { Accordion, type AccordionContentProps, type AccordionContextValue, type AccordionItemProps, type AccordionProps, type AccordionTriggerProps, Action, type ActionColor, type ActionProps, type AffixPosition, Autocomplete, type AutocompleteOption, type AutocompleteProps, Avatar, type AvatarProps, Badge, type BadgeProps, Brand, type BrandProps, Breadcrumbs, type BreadcrumbsItemProps, type BreadcrumbsProps, Calendar, type CalendarMode, type CalendarProps, Callout, type CalloutProps, Canvas, type CanvasContextValue, type CanvasControlsProps, type CanvasEdgeProps, type CanvasMinimapProps, type CanvasNodeProps, type CanvasProps, Card, type CardBodyProps, type CardFooterProps, type CardHeaderProps, type CardProps, Carousel, type CarouselContextValue, type CarouselControlsProps, type CarouselPanelsProps, type CarouselProps, type CarouselSlideProps, type CarouselStepsProps, type CarouselVariant, Chart, type ChartAreaProps, type ChartBarData, type ChartBarProps, type ChartCommonProps, type ChartDonutData, type ChartDonutProps, type ChartHorizontalBarProps, type ChartLineProps, type ChartPieData, type ChartPieProps, type ChartSeries, type ChartSparklineProps, type ChartStackedBarProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, type Color, ColorPicker, type ColorPickerProps, Command, type CommandContextValue, type CommandEmptyProps, type CommandGroupProps, type CommandInputProps, type CommandItemProps, type CommandListProps, type CommandProps, Composer, type ComposerProps, ContentRenderer, type ContentRendererProps, ContextMenu, type ContextMenuContentProps, type ContextMenuContextValue, type ContextMenuItemProps, type ContextMenuProps, type ContextMenuSeparatorProps, type ContextMenuTriggerProps, DatePicker, type DatePickerProps, type DateRange, Diagram, type DiagramContextValue, type DiagramEntityData, type DiagramEntityProps, type DiagramFieldData, type DiagramFieldProps, type DiagramProps, type DiagramRelationData, type DiagramRelationProps, type DiagramSchema, type DiagramToolbarProps, type DiagramType, Dropdown, type DropdownContextValue, type DropdownItemProps, type DropdownItemsProps, type DropdownProps, type DropdownSeparatorProps, type DropdownTriggerProps, EMOJI_DATA, EMOJI_ENTRIES, type EdgeAnchor, Editor, type EditorAction, type EditorContentProps, type EditorContextValue, type EditorProps, type EditorToolbarProps, Emoji, type EmojiProps, EmojiSelect, type EmojiSelectProps, type ExportFormat, Field, type FieldProps, FileUpload, type FileUploadContextValue, type FileUploadDropzoneProps, type FileUploadListProps, type FileUploadProps, Heading, type HeadingProps, Icon, type IconProps, type IconSet, Input, type InputAffixProps, type InputBaseProps, type InputOption, type InputOptionGroup, type InputProps, Kanban, type KanbanCardProps, type KanbanColumnProps, type KanbanContextValue, type KanbanProps, Menu, type MenuContextValue, type MenuGroupProps, type MenuItemProps, type MenuOrientation, type MenuProps, type MenuSubmenuProps, MobileMenu, type MobileMenuBottomBarProps, type MobileMenuContextValue, type MobileMenuFlyoutProps, type MobileMenuItemProps, type MobileMenuSide, type MobileMenuVariant, Modal, type ModalBodyProps, type ModalContextValue, type ModalFooterProps, type ModalHeaderProps, type ModalProps, MultiSwitch, type MultiSwitchProps, Navbar, type NavbarBrandProps, type NavbarContextValue, type NavbarItemProps, type NavbarItemsProps, type NavbarProps, type NavbarToggleProps, type NodeRect, OtpInput, type OtpInputProps, Pagination, type PaginationProps, Pillbox, type PillboxProps, type Placement, Popover, type PopoverContentProps, type PopoverContextValue, type PopoverProps, type PopoverTriggerProps, Portal, type PortalProps, Profile, type ProfileProps, Progress, type ProgressProps, RadioGroup, type RadioGroupProps, type RelationType, type RenderExtension, type RenderExtensionProps, Select, type SelectProps, Separator, type SeparatorProps, Sidebar, type SidebarCollapseMode, type SidebarContextValue, type SidebarGroupProps, type SidebarItemProps, type SidebarProps, type SidebarSubmenuProps, type SidebarToggleProps, type Size, Skeleton, type SkeletonProps, Slider, type SliderProps, Switch, type SwitchProps, Table, type TableBodyProps, type TableCellProps, type TableColumnProps, type TableHeadProps, type TablePaginationProps, type TableProps, type TableRowProps, type TableRowTrayProps, type TableSearchProps, type TableTrayProps, Tabs, type TabsContextValue, type TabsListProps, type TabsPanelProps, type TabsPanelsProps, type TabsProps, type TabsTabProps, type TabsVariant, Text, type TextProps, Textarea, type TextareaProps, TimePicker, type TimePickerProps, Timeline, type TimelineBlockProps, type TimelineItemProps, type TimelineProps, Toast, type ToastContextValue, type ToastData, type ToastPosition, type ToastProviderProps, type ToastVariant, Tooltip, type TooltipProps, type Variant, type ViewportState, cn, configureIcons, find, registerExtension, registerExtensions, registerIconSet, resolve, search, useAccordion, useAnimation, useCanvas, useCarousel, useCommand, useContextMenu, useControllableState, useDiagram, useDropdown, useEditor, useEscapeKey, useFileUpload, useFloatingPosition, useFocusTrap, useId, useKanban, useMenu, useMobileMenu, useModal, useNavbar, useNodeRegistry, useOutsideClick, usePanZoom, usePopover, useSidebar, useTabs, useToast };
|
|
2043
|
+
export { Accordion, type AccordionContentProps, type AccordionContextValue, type AccordionItemProps, type AccordionProps, type AccordionTriggerProps, Action, type ActionColor, type ActionProps, type AffixPosition, Autocomplete, type AutocompleteOption, type AutocompleteProps, Avatar, type AvatarProps, Badge, type BadgeProps, Brand, type BrandProps, Breadcrumbs, type BreadcrumbsItemProps, type BreadcrumbsProps, Calendar, type CalendarMode, type CalendarProps, Callout, type CalloutProps, Canvas, type CanvasContextValue, type CanvasControlsProps, type CanvasEdgeProps, type CanvasMinimapProps, type CanvasNodeProps, type CanvasProps, Card, type CardBodyProps, type CardFooterProps, type CardHeaderProps, type CardProps, Carousel, type CarouselContextValue, type CarouselControlsProps, type CarouselPanelsProps, type CarouselProps, type CarouselSlideProps, type CarouselStepsProps, type CarouselVariant, Chart, type ChartAreaProps, type ChartBarData, type ChartBarProps, type ChartCommonProps, type ChartDonutData, type ChartDonutProps, type ChartHorizontalBarProps, type ChartLineProps, type ChartPieData, type ChartPieProps, type ChartSeries, type ChartSparklineProps, type ChartStackedBarProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, type Color, ColorPicker, type ColorPickerProps, Command, type CommandContextValue, type CommandEmptyProps, type CommandGroupProps, type CommandInputProps, type CommandItemProps, type CommandListProps, type CommandProps, Composer, type ComposerProps, ContentRenderer, type ContentRendererProps, ContextMenu, type ContextMenuContentProps, type ContextMenuContextValue, type ContextMenuItemProps, type ContextMenuProps, type ContextMenuSeparatorProps, type ContextMenuTriggerProps, DatePicker, type DatePickerProps, type DateRange, Diagram, type DiagramContextValue, type DiagramEntityData, type DiagramEntityProps, type DiagramFieldData, type DiagramFieldProps, type DiagramProps, type DiagramRelationData, type DiagramRelationProps, type DiagramSchema, type DiagramToolbarProps, type DiagramType, Dropdown, type DropdownContextValue, type DropdownItemProps, type DropdownItemsProps, type DropdownProps, type DropdownSeparatorProps, type DropdownTriggerProps, EMOJI_DATA, EMOJI_ENTRIES, type EdgeAnchor, Editor, type EditorAction, type EditorContentProps, type EditorContextValue, type EditorProps, type EditorToolbarProps, Emoji, type EmojiProps, EmojiSelect, type EmojiSelectProps, type ExportFormat, Field, type FieldProps, FileUpload, type FileUploadContextValue, type FileUploadDropzoneProps, type FileUploadListProps, type FileUploadProps, Heading, type HeadingProps, Icon, type IconProps, type IconSet, Input, type InputAffixProps, type InputBaseProps, type InputOption, type InputOptionGroup, type InputProps, Kanban, type KanbanCardProps, type KanbanColumnProps, type KanbanContextValue, type KanbanProps, Menu, type MenuContextValue, type MenuGroupProps, type MenuItemProps, type MenuOrientation, type MenuProps, type MenuSubmenuProps, MobileMenu, type MobileMenuBottomBarProps, type MobileMenuContextValue, type MobileMenuFlyoutProps, type MobileMenuItemProps, type MobileMenuSide, type MobileMenuVariant, Modal, type ModalBodyProps, type ModalContextValue, type ModalFooterProps, type ModalHeaderProps, type ModalProps, MultiSwitch, type MultiSwitchProps, Navbar, type NavbarBrandProps, type NavbarContextValue, type NavbarItemProps, type NavbarItemsProps, type NavbarProps, type NavbarToggleProps, type NodeRect, OtpInput, type OtpInputProps, Pagination, type PaginationProps, Pillbox, type PillboxProps, type Placement, Popover, type PopoverContentProps, type PopoverContextValue, type PopoverProps, type PopoverTriggerProps, Portal, type PortalProps, Profile, type ProfileProps, Progress, type ProgressProps, RadioGroup, type RadioGroupProps, type RelationType, type RenderExtension, type RenderExtensionProps, Select, type SelectProps, Separator, type SeparatorProps, Sidebar, type SidebarCollapseMode, type SidebarContextValue, type SidebarGroupProps, type SidebarItemProps, type SidebarProps, type SidebarSubmenuProps, type SidebarToggleProps, type Size, Skeleton, type SkeletonProps, Slider, type SliderProps, Switch, type SwitchProps, Table, type TableBodyProps, type TableCellProps, type TableColumnProps, type TableHeadProps, type TablePaginationProps, type TableProps, type TableRowProps, type TableRowTrayProps, type TableSearchProps, type TableTrayProps, Tabs, type TabsContextValue, type TabsListProps, type TabsPanelProps, type TabsPanelsProps, type TabsProps, type TabsTabProps, type TabsVariant, Text, type TextProps, Textarea, type TextareaProps, TimePicker, type TimePickerProps, Timeline, type TimelineBlockProps, type TimelineItemProps, type TimelineOrientation, type TimelineProps, Toast, type ToastContextValue, type ToastData, type ToastPosition, type ToastProviderProps, type ToastVariant, Tooltip, type TooltipProps, type Variant, type ViewportState, cn, configureIcons, find, registerExtension, registerExtensions, registerIconSet, resolve, search, useAccordion, useAnimation, useCanvas, useCarousel, useCommand, useContextMenu, useControllableState, useDiagram, useDropdown, useEditor, useEscapeKey, useFileUpload, useFloatingPosition, useFocusTrap, useId, useKanban, useMenu, useMobileMenu, useModal, useNavbar, useNodeRegistry, useOutsideClick, usePanZoom, usePopover, useSidebar, useTabs, useToast };
|
package/dist/index.js
CHANGED
|
@@ -4196,6 +4196,13 @@ var Callout = forwardRef(
|
|
|
4196
4196
|
}
|
|
4197
4197
|
);
|
|
4198
4198
|
Callout.displayName = "Callout";
|
|
4199
|
+
var TimelineContext = createContext({
|
|
4200
|
+
orientation: "vertical",
|
|
4201
|
+
index: 0
|
|
4202
|
+
});
|
|
4203
|
+
function useTimeline() {
|
|
4204
|
+
return useContext(TimelineContext);
|
|
4205
|
+
}
|
|
4199
4206
|
var dotColorClasses2 = {
|
|
4200
4207
|
blue: "bg-blue-500 dark:bg-blue-400",
|
|
4201
4208
|
green: "bg-green-500 dark:bg-green-400",
|
|
@@ -4217,6 +4224,34 @@ var ringColorClasses = {
|
|
|
4217
4224
|
red: "ring-red-500/30 dark:ring-red-400/30",
|
|
4218
4225
|
zinc: "ring-zinc-400/30 dark:ring-zinc-500/30"
|
|
4219
4226
|
};
|
|
4227
|
+
function Dot({ icon, color, active }) {
|
|
4228
|
+
const c = color ?? "zinc";
|
|
4229
|
+
if (icon) {
|
|
4230
|
+
return /* @__PURE__ */ jsx(
|
|
4231
|
+
"span",
|
|
4232
|
+
{
|
|
4233
|
+
className: cn(
|
|
4234
|
+
"flex h-6 w-6 items-center justify-center rounded-full bg-white dark:bg-zinc-900",
|
|
4235
|
+
iconColorClasses2[c],
|
|
4236
|
+
active && "ring-4",
|
|
4237
|
+
active && ringColorClasses[c]
|
|
4238
|
+
),
|
|
4239
|
+
children: icon
|
|
4240
|
+
}
|
|
4241
|
+
);
|
|
4242
|
+
}
|
|
4243
|
+
return /* @__PURE__ */ jsx(
|
|
4244
|
+
"span",
|
|
4245
|
+
{
|
|
4246
|
+
className: cn(
|
|
4247
|
+
"h-3 w-3 rounded-full",
|
|
4248
|
+
dotColorClasses2[c],
|
|
4249
|
+
active && "ring-4",
|
|
4250
|
+
active && ringColorClasses[c]
|
|
4251
|
+
)
|
|
4252
|
+
}
|
|
4253
|
+
);
|
|
4254
|
+
}
|
|
4220
4255
|
var TimelineItem = forwardRef(
|
|
4221
4256
|
({
|
|
4222
4257
|
children,
|
|
@@ -4225,6 +4260,28 @@ var TimelineItem = forwardRef(
|
|
|
4225
4260
|
active = false,
|
|
4226
4261
|
className
|
|
4227
4262
|
}, ref) => {
|
|
4263
|
+
const { orientation, index } = useTimeline();
|
|
4264
|
+
if (orientation === "horizontal") {
|
|
4265
|
+
const isTop = index % 2 === 0;
|
|
4266
|
+
return /* @__PURE__ */ jsxs(
|
|
4267
|
+
"div",
|
|
4268
|
+
{
|
|
4269
|
+
ref,
|
|
4270
|
+
"data-react-fancy-timeline-item": "",
|
|
4271
|
+
className: cn("relative flex flex-col items-center", className),
|
|
4272
|
+
style: { minWidth: 120 },
|
|
4273
|
+
children: [
|
|
4274
|
+
/* @__PURE__ */ jsx("div", { className: cn("flex min-h-[4rem] items-end pb-2", !isTop && "invisible"), children: isTop && /* @__PURE__ */ jsx("div", { className: "min-w-0 text-center", children }) }),
|
|
4275
|
+
/* @__PURE__ */ jsxs("div", { className: "relative flex w-full items-center justify-center", children: [
|
|
4276
|
+
/* @__PURE__ */ jsx("div", { className: "h-px flex-1 bg-zinc-200 dark:bg-zinc-700" }),
|
|
4277
|
+
/* @__PURE__ */ jsx("div", { className: "relative z-10 flex shrink-0 items-center justify-center", children: /* @__PURE__ */ jsx(Dot, { icon, color, active }) }),
|
|
4278
|
+
/* @__PURE__ */ jsx("div", { className: "h-px flex-1 bg-zinc-200 dark:bg-zinc-700" })
|
|
4279
|
+
] }),
|
|
4280
|
+
/* @__PURE__ */ jsx("div", { className: cn("flex min-h-[4rem] items-start pt-2", isTop && "invisible"), children: !isTop && /* @__PURE__ */ jsx("div", { className: "min-w-0 text-center", children }) })
|
|
4281
|
+
]
|
|
4282
|
+
}
|
|
4283
|
+
);
|
|
4284
|
+
}
|
|
4228
4285
|
return /* @__PURE__ */ jsxs(
|
|
4229
4286
|
"div",
|
|
4230
4287
|
{
|
|
@@ -4233,28 +4290,7 @@ var TimelineItem = forwardRef(
|
|
|
4233
4290
|
className: cn("relative flex gap-4 pb-8 last:pb-0", className),
|
|
4234
4291
|
children: [
|
|
4235
4292
|
/* @__PURE__ */ jsx("div", { className: "absolute left-[11px] top-6 bottom-0 w-px bg-zinc-200 last:hidden dark:bg-zinc-700" }),
|
|
4236
|
-
/* @__PURE__ */ jsx("div", { className: "relative z-10 flex shrink-0", children:
|
|
4237
|
-
"span",
|
|
4238
|
-
{
|
|
4239
|
-
className: cn(
|
|
4240
|
-
"flex h-6 w-6 items-center justify-center rounded-full bg-white dark:bg-zinc-900",
|
|
4241
|
-
iconColorClasses2[color],
|
|
4242
|
-
active && "ring-4",
|
|
4243
|
-
active && ringColorClasses[color]
|
|
4244
|
-
),
|
|
4245
|
-
children: icon
|
|
4246
|
-
}
|
|
4247
|
-
) : /* @__PURE__ */ jsx(
|
|
4248
|
-
"span",
|
|
4249
|
-
{
|
|
4250
|
-
className: cn(
|
|
4251
|
-
"mt-1.5 h-3 w-3 rounded-full",
|
|
4252
|
-
dotColorClasses2[color],
|
|
4253
|
-
active && "ring-4",
|
|
4254
|
-
active && ringColorClasses[color]
|
|
4255
|
-
)
|
|
4256
|
-
}
|
|
4257
|
-
) }),
|
|
4293
|
+
/* @__PURE__ */ jsx("div", { className: "relative z-10 flex shrink-0 mt-1.5", children: /* @__PURE__ */ jsx(Dot, { icon, color, active }) }),
|
|
4258
4294
|
/* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1 pt-0.5", children })
|
|
4259
4295
|
]
|
|
4260
4296
|
}
|
|
@@ -4284,14 +4320,19 @@ var TimelineBlock = forwardRef(
|
|
|
4284
4320
|
);
|
|
4285
4321
|
TimelineBlock.displayName = "TimelineBlock";
|
|
4286
4322
|
var TimelineRoot = forwardRef(
|
|
4287
|
-
({ children, className }, ref) => {
|
|
4323
|
+
({ children, orientation = "vertical", className }, ref) => {
|
|
4324
|
+
const items = Children.toArray(children);
|
|
4288
4325
|
return /* @__PURE__ */ jsx(
|
|
4289
4326
|
"div",
|
|
4290
4327
|
{
|
|
4291
4328
|
ref,
|
|
4292
4329
|
"data-react-fancy-timeline": "",
|
|
4293
|
-
|
|
4294
|
-
|
|
4330
|
+
"data-orientation": orientation,
|
|
4331
|
+
className: cn(
|
|
4332
|
+
orientation === "vertical" ? "flex flex-col" : "flex flex-row items-center overflow-x-auto",
|
|
4333
|
+
className
|
|
4334
|
+
),
|
|
4335
|
+
children: items.map((child, i) => /* @__PURE__ */ jsx(TimelineContext.Provider, { value: { orientation, index: i }, children: child }, i))
|
|
4295
4336
|
}
|
|
4296
4337
|
);
|
|
4297
4338
|
}
|
|
@@ -4457,12 +4498,13 @@ function PopoverTrigger({ children }) {
|
|
|
4457
4498
|
});
|
|
4458
4499
|
}
|
|
4459
4500
|
PopoverTrigger.displayName = "PopoverTrigger";
|
|
4460
|
-
function useOutsideClick(ref, handler, enabled = true) {
|
|
4501
|
+
function useOutsideClick(ref, handler, enabled = true, ignoreRef) {
|
|
4461
4502
|
useEffect(() => {
|
|
4462
4503
|
if (!enabled) return;
|
|
4463
4504
|
const listener = (event) => {
|
|
4464
4505
|
const el = ref.current;
|
|
4465
4506
|
if (!el || el.contains(event.target)) return;
|
|
4507
|
+
if (ignoreRef?.current?.contains(event.target)) return;
|
|
4466
4508
|
handler(event);
|
|
4467
4509
|
};
|
|
4468
4510
|
document.addEventListener("mousedown", listener);
|
|
@@ -4471,7 +4513,7 @@ function useOutsideClick(ref, handler, enabled = true) {
|
|
|
4471
4513
|
document.removeEventListener("mousedown", listener);
|
|
4472
4514
|
document.removeEventListener("touchstart", listener);
|
|
4473
4515
|
};
|
|
4474
|
-
}, [ref, handler, enabled]);
|
|
4516
|
+
}, [ref, handler, enabled, ignoreRef]);
|
|
4475
4517
|
}
|
|
4476
4518
|
function useEscapeKey(handler, enabled = true) {
|
|
4477
4519
|
useEffect(() => {
|
|
@@ -4525,7 +4567,7 @@ function PopoverContent({ children, className }) {
|
|
|
4525
4567
|
enabled: open
|
|
4526
4568
|
});
|
|
4527
4569
|
const close = useCallback(() => setOpen(false), [setOpen]);
|
|
4528
|
-
useOutsideClick(outsideRef, close, open);
|
|
4570
|
+
useOutsideClick(outsideRef, close, open, anchorRef);
|
|
4529
4571
|
useEscapeKey(close, open);
|
|
4530
4572
|
const { mounted, className: animClass, ref: animRef } = useAnimation({
|
|
4531
4573
|
open,
|
|
@@ -4610,7 +4652,7 @@ function DropdownItems({ children, className }) {
|
|
|
4610
4652
|
setOpen(false);
|
|
4611
4653
|
setActiveIndex(-1);
|
|
4612
4654
|
}, [setOpen, setActiveIndex]);
|
|
4613
|
-
useOutsideClick(outsideRef, close, open);
|
|
4655
|
+
useOutsideClick(outsideRef, close, open, anchorRef);
|
|
4614
4656
|
useEscapeKey(close, open);
|
|
4615
4657
|
const { mounted, className: animClass, ref: animRef } = useAnimation({
|
|
4616
4658
|
open,
|