@particle-academy/react-fancy 3.2.1 → 3.3.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/README.md +14 -7
- package/dist/index.cjs +122 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +51 -1
- package/dist/index.d.ts +51 -1
- package/dist/index.js +122 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -906,6 +906,56 @@ declare const Timeline: react.ForwardRefExoticComponent<TimelineProps & react.Re
|
|
|
906
906
|
Block: react.ForwardRefExoticComponent<TimelineBlockProps & react.RefAttributes<HTMLDivElement>>;
|
|
907
907
|
};
|
|
908
908
|
|
|
909
|
+
/**
|
|
910
|
+
* Subset of palette colors the TimeGrid offers for the "cell-on" tone.
|
|
911
|
+
* Mirrors react-fancy's `ActionColor` choice — small enough to keep the
|
|
912
|
+
* compiled CSS tight, broad enough to cover most use cases.
|
|
913
|
+
*/
|
|
914
|
+
type TimeGridTone = "violet" | "emerald" | "sky" | "rose" | "amber" | "indigo" | "blue" | "zinc";
|
|
915
|
+
interface TimeGridProps {
|
|
916
|
+
/** Row labels, one per row in `value` (e.g. ["Sun","Mon",…]). */
|
|
917
|
+
rows: string[];
|
|
918
|
+
/** Column labels, one per column in `value` (e.g. ["0","1",…,"23"]). */
|
|
919
|
+
cols: string[];
|
|
920
|
+
/**
|
|
921
|
+
* Controlled cell state. Must be a rectangular `rows.length × cols.length`
|
|
922
|
+
* matrix of booleans. The component never mutates it — every change
|
|
923
|
+
* produces a new array passed to `onChange`.
|
|
924
|
+
*/
|
|
925
|
+
value: boolean[][];
|
|
926
|
+
/** Called with the next matrix whenever a cell, row, or column toggles. */
|
|
927
|
+
onChange: (next: boolean[][]) => void;
|
|
928
|
+
/** Cell-on tone. Default `"violet"`. */
|
|
929
|
+
toneOn?: TimeGridTone;
|
|
930
|
+
/** Cell width in px. Default `20`. */
|
|
931
|
+
cellWidth?: number;
|
|
932
|
+
/** Cell height in px. Default `16`. */
|
|
933
|
+
cellHeight?: number;
|
|
934
|
+
/**
|
|
935
|
+
* If true (default), only every Nth column label is rendered to keep the
|
|
936
|
+
* top axis legible at small `cellWidth`. Set false to show all labels.
|
|
937
|
+
*/
|
|
938
|
+
sparseColLabels?: boolean;
|
|
939
|
+
/** If true (default), clicking a row/column header toggles that strip. */
|
|
940
|
+
toggleStripsOnHeaderClick?: boolean;
|
|
941
|
+
/**
|
|
942
|
+
* Optional accessible label per cell. Default produces
|
|
943
|
+
* `${rows[r]} ${cols[c]} on|off`. Override for richer context
|
|
944
|
+
* (e.g. include unit: `${rows[r]} ${cols[c]}:00 ${on ? "on" : "off"}`).
|
|
945
|
+
*/
|
|
946
|
+
ariaCell?: (rowIdx: number, colIdx: number, on: boolean) => string;
|
|
947
|
+
/**
|
|
948
|
+
* Stable per-cell identifier. Emitted as `data-react-fancy-timegrid-cell`
|
|
949
|
+
* on the button so MCP bridges can address a specific cell from a tool
|
|
950
|
+
* call without DOM walking. Default `${row}:${col}`.
|
|
951
|
+
*/
|
|
952
|
+
cellId?: (rowIdx: number, colIdx: number) => string;
|
|
953
|
+
/** Additional CSS classes on the outer scroll container. */
|
|
954
|
+
className?: string;
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
declare const TimeGrid: react.ForwardRefExoticComponent<TimeGridProps & react.RefAttributes<HTMLDivElement>>;
|
|
958
|
+
|
|
909
959
|
interface TooltipProps {
|
|
910
960
|
children: ReactElement;
|
|
911
961
|
content: ReactNode;
|
|
@@ -2813,4 +2863,4 @@ interface MagicWandProps {
|
|
|
2813
2863
|
}
|
|
2814
2864
|
declare function MagicWand({ value, onValueChange, actions, appearance, autoHide, rows, placeholder, onAction, }: MagicWandProps): react_jsx_runtime.JSX.Element;
|
|
2815
2865
|
|
|
2816
|
-
export { Accordion, type AccordionContentProps, type AccordionContextValue, type AccordionItemProps, type AccordionOrientation, AccordionPanel, AccordionPanelContent, type AccordionPanelContentProps, type AccordionPanelProps, AccordionPanelSection, type AccordionPanelSectionProps, AccordionPanelTrigger, type AccordionPanelTriggerProps, 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, 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, ChatDrawer, type ChatDrawerProps, type ChatDrawerTab, 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, type ControlledAdapterHandle, DatePicker, type DatePickerProps, type DateRange, type DropPosition, Dropdown, type DropdownContextValue, type DropdownItemProps, type DropdownItemsProps, type DropdownProps, type DropdownSeparatorProps, type DropdownTriggerProps, EMOJI_CATEGORY_ORDER, EMOJI_DATA, EMOJI_ENTRIES, Editor, type EditorAction, type EditorContentProps, type EditorContextValue, type EditorProps, type EditorToolbarProps, Emoji, type EmojiCategory, type EmojiCategoryKey, type EmojiEntry, type EmojiFlatEntry, type EmojiProps, EmojiSelect, type EmojiSelectProps, 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, InputTag, type InputTagAdapter, type InputTagAdapterState, type InputTagProps, type InputTagTrigger, type InputTagTriggers, Kanban, type KanbanCardMoveHandler, type KanbanCardProps, type KanbanColumnHandleProps, type KanbanColumnMoveHandler, type KanbanColumnProps, type KanbanContextValue, type KanbanProps, MagicWand, type MagicWandAction, type MagicWandAppearance, type MagicWandProps, type MagicWandSelection, 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, MoodMeter, type MoodMeterProps, 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, type PromptAttachment, type PromptCmd, PromptInput, type PromptInputProps, type PromptMention, RadioGroup, type RadioGroupProps, ReasonTag, type ReasonTagProps, type ReasonTagSource, type ReasonTagTheme, type RenderExtension, type RenderExtensionProps, SKIN_TONES, type SectionRenderState, type SectionRenderable, 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, type SkinTone, 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 TimelineEvent, type TimelineItemProps, type TimelineOrientation, type TimelineProps, type TimelineVariant, Toast, type ToastContextValue, type ToastData, type ToastPosition, type ToastProviderProps, type ToastVariant, Tooltip, type TooltipProps, TreeNav, type TreeNavContextValue, type TreeNavProps, type TreeNodeData, type TreeNodeProps, type Variant, applyTone, cn, configureIcons, contentEditableAdapter, controlledAdapter, find, hasSkinTones, inputAdapter, registerExtension, registerExtensions, registerIconSet, registerIcons, resolve, sanitizeHref, sanitizeHtml, search, skinTones, textareaAdapter, useAccordion, useAccordionPanel, useAccordionSection, useAnimation, useCarousel, useCommand, useContextMenu, useControllableState, useDropdown, useEditor, useEscapeKey, useFileUpload, useFloatingPosition, useFocusTrap, useId, useKanban, useMenu, useMobileMenu, useModal, useNavbar, useNodeRegistry, useOutsideClick, usePanZoom, usePopover, useSidebar, useTabs, useToast, useTreeNav };
|
|
2866
|
+
export { Accordion, type AccordionContentProps, type AccordionContextValue, type AccordionItemProps, type AccordionOrientation, AccordionPanel, AccordionPanelContent, type AccordionPanelContentProps, type AccordionPanelProps, AccordionPanelSection, type AccordionPanelSectionProps, AccordionPanelTrigger, type AccordionPanelTriggerProps, 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, 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, ChatDrawer, type ChatDrawerProps, type ChatDrawerTab, 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, type ControlledAdapterHandle, DatePicker, type DatePickerProps, type DateRange, type DropPosition, Dropdown, type DropdownContextValue, type DropdownItemProps, type DropdownItemsProps, type DropdownProps, type DropdownSeparatorProps, type DropdownTriggerProps, EMOJI_CATEGORY_ORDER, EMOJI_DATA, EMOJI_ENTRIES, Editor, type EditorAction, type EditorContentProps, type EditorContextValue, type EditorProps, type EditorToolbarProps, Emoji, type EmojiCategory, type EmojiCategoryKey, type EmojiEntry, type EmojiFlatEntry, type EmojiProps, EmojiSelect, type EmojiSelectProps, 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, InputTag, type InputTagAdapter, type InputTagAdapterState, type InputTagProps, type InputTagTrigger, type InputTagTriggers, Kanban, type KanbanCardMoveHandler, type KanbanCardProps, type KanbanColumnHandleProps, type KanbanColumnMoveHandler, type KanbanColumnProps, type KanbanContextValue, type KanbanProps, MagicWand, type MagicWandAction, type MagicWandAppearance, type MagicWandProps, type MagicWandSelection, 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, MoodMeter, type MoodMeterProps, 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, type PromptAttachment, type PromptCmd, PromptInput, type PromptInputProps, type PromptMention, RadioGroup, type RadioGroupProps, ReasonTag, type ReasonTagProps, type ReasonTagSource, type ReasonTagTheme, type RenderExtension, type RenderExtensionProps, SKIN_TONES, type SectionRenderState, type SectionRenderable, 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, type SkinTone, 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, TimeGrid, type TimeGridProps, type TimeGridTone, TimePicker, type TimePickerProps, Timeline, type TimelineBlockProps, type TimelineEvent, type TimelineItemProps, type TimelineOrientation, type TimelineProps, type TimelineVariant, Toast, type ToastContextValue, type ToastData, type ToastPosition, type ToastProviderProps, type ToastVariant, Tooltip, type TooltipProps, TreeNav, type TreeNavContextValue, type TreeNavProps, type TreeNodeData, type TreeNodeProps, type Variant, applyTone, cn, configureIcons, contentEditableAdapter, controlledAdapter, find, hasSkinTones, inputAdapter, registerExtension, registerExtensions, registerIconSet, registerIcons, resolve, sanitizeHref, sanitizeHtml, search, skinTones, textareaAdapter, useAccordion, useAccordionPanel, useAccordionSection, useAnimation, useCarousel, useCommand, useContextMenu, useControllableState, useDropdown, useEditor, useEscapeKey, useFileUpload, useFloatingPosition, useFocusTrap, useId, useKanban, useMenu, useMobileMenu, useModal, useNavbar, useNodeRegistry, useOutsideClick, usePanZoom, usePopover, useSidebar, useTabs, useToast, useTreeNav };
|
package/dist/index.d.ts
CHANGED
|
@@ -906,6 +906,56 @@ declare const Timeline: react.ForwardRefExoticComponent<TimelineProps & react.Re
|
|
|
906
906
|
Block: react.ForwardRefExoticComponent<TimelineBlockProps & react.RefAttributes<HTMLDivElement>>;
|
|
907
907
|
};
|
|
908
908
|
|
|
909
|
+
/**
|
|
910
|
+
* Subset of palette colors the TimeGrid offers for the "cell-on" tone.
|
|
911
|
+
* Mirrors react-fancy's `ActionColor` choice — small enough to keep the
|
|
912
|
+
* compiled CSS tight, broad enough to cover most use cases.
|
|
913
|
+
*/
|
|
914
|
+
type TimeGridTone = "violet" | "emerald" | "sky" | "rose" | "amber" | "indigo" | "blue" | "zinc";
|
|
915
|
+
interface TimeGridProps {
|
|
916
|
+
/** Row labels, one per row in `value` (e.g. ["Sun","Mon",…]). */
|
|
917
|
+
rows: string[];
|
|
918
|
+
/** Column labels, one per column in `value` (e.g. ["0","1",…,"23"]). */
|
|
919
|
+
cols: string[];
|
|
920
|
+
/**
|
|
921
|
+
* Controlled cell state. Must be a rectangular `rows.length × cols.length`
|
|
922
|
+
* matrix of booleans. The component never mutates it — every change
|
|
923
|
+
* produces a new array passed to `onChange`.
|
|
924
|
+
*/
|
|
925
|
+
value: boolean[][];
|
|
926
|
+
/** Called with the next matrix whenever a cell, row, or column toggles. */
|
|
927
|
+
onChange: (next: boolean[][]) => void;
|
|
928
|
+
/** Cell-on tone. Default `"violet"`. */
|
|
929
|
+
toneOn?: TimeGridTone;
|
|
930
|
+
/** Cell width in px. Default `20`. */
|
|
931
|
+
cellWidth?: number;
|
|
932
|
+
/** Cell height in px. Default `16`. */
|
|
933
|
+
cellHeight?: number;
|
|
934
|
+
/**
|
|
935
|
+
* If true (default), only every Nth column label is rendered to keep the
|
|
936
|
+
* top axis legible at small `cellWidth`. Set false to show all labels.
|
|
937
|
+
*/
|
|
938
|
+
sparseColLabels?: boolean;
|
|
939
|
+
/** If true (default), clicking a row/column header toggles that strip. */
|
|
940
|
+
toggleStripsOnHeaderClick?: boolean;
|
|
941
|
+
/**
|
|
942
|
+
* Optional accessible label per cell. Default produces
|
|
943
|
+
* `${rows[r]} ${cols[c]} on|off`. Override for richer context
|
|
944
|
+
* (e.g. include unit: `${rows[r]} ${cols[c]}:00 ${on ? "on" : "off"}`).
|
|
945
|
+
*/
|
|
946
|
+
ariaCell?: (rowIdx: number, colIdx: number, on: boolean) => string;
|
|
947
|
+
/**
|
|
948
|
+
* Stable per-cell identifier. Emitted as `data-react-fancy-timegrid-cell`
|
|
949
|
+
* on the button so MCP bridges can address a specific cell from a tool
|
|
950
|
+
* call without DOM walking. Default `${row}:${col}`.
|
|
951
|
+
*/
|
|
952
|
+
cellId?: (rowIdx: number, colIdx: number) => string;
|
|
953
|
+
/** Additional CSS classes on the outer scroll container. */
|
|
954
|
+
className?: string;
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
declare const TimeGrid: react.ForwardRefExoticComponent<TimeGridProps & react.RefAttributes<HTMLDivElement>>;
|
|
958
|
+
|
|
909
959
|
interface TooltipProps {
|
|
910
960
|
children: ReactElement;
|
|
911
961
|
content: ReactNode;
|
|
@@ -2813,4 +2863,4 @@ interface MagicWandProps {
|
|
|
2813
2863
|
}
|
|
2814
2864
|
declare function MagicWand({ value, onValueChange, actions, appearance, autoHide, rows, placeholder, onAction, }: MagicWandProps): react_jsx_runtime.JSX.Element;
|
|
2815
2865
|
|
|
2816
|
-
export { Accordion, type AccordionContentProps, type AccordionContextValue, type AccordionItemProps, type AccordionOrientation, AccordionPanel, AccordionPanelContent, type AccordionPanelContentProps, type AccordionPanelProps, AccordionPanelSection, type AccordionPanelSectionProps, AccordionPanelTrigger, type AccordionPanelTriggerProps, 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, 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, ChatDrawer, type ChatDrawerProps, type ChatDrawerTab, 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, type ControlledAdapterHandle, DatePicker, type DatePickerProps, type DateRange, type DropPosition, Dropdown, type DropdownContextValue, type DropdownItemProps, type DropdownItemsProps, type DropdownProps, type DropdownSeparatorProps, type DropdownTriggerProps, EMOJI_CATEGORY_ORDER, EMOJI_DATA, EMOJI_ENTRIES, Editor, type EditorAction, type EditorContentProps, type EditorContextValue, type EditorProps, type EditorToolbarProps, Emoji, type EmojiCategory, type EmojiCategoryKey, type EmojiEntry, type EmojiFlatEntry, type EmojiProps, EmojiSelect, type EmojiSelectProps, 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, InputTag, type InputTagAdapter, type InputTagAdapterState, type InputTagProps, type InputTagTrigger, type InputTagTriggers, Kanban, type KanbanCardMoveHandler, type KanbanCardProps, type KanbanColumnHandleProps, type KanbanColumnMoveHandler, type KanbanColumnProps, type KanbanContextValue, type KanbanProps, MagicWand, type MagicWandAction, type MagicWandAppearance, type MagicWandProps, type MagicWandSelection, 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, MoodMeter, type MoodMeterProps, 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, type PromptAttachment, type PromptCmd, PromptInput, type PromptInputProps, type PromptMention, RadioGroup, type RadioGroupProps, ReasonTag, type ReasonTagProps, type ReasonTagSource, type ReasonTagTheme, type RenderExtension, type RenderExtensionProps, SKIN_TONES, type SectionRenderState, type SectionRenderable, 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, type SkinTone, 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 TimelineEvent, type TimelineItemProps, type TimelineOrientation, type TimelineProps, type TimelineVariant, Toast, type ToastContextValue, type ToastData, type ToastPosition, type ToastProviderProps, type ToastVariant, Tooltip, type TooltipProps, TreeNav, type TreeNavContextValue, type TreeNavProps, type TreeNodeData, type TreeNodeProps, type Variant, applyTone, cn, configureIcons, contentEditableAdapter, controlledAdapter, find, hasSkinTones, inputAdapter, registerExtension, registerExtensions, registerIconSet, registerIcons, resolve, sanitizeHref, sanitizeHtml, search, skinTones, textareaAdapter, useAccordion, useAccordionPanel, useAccordionSection, useAnimation, useCarousel, useCommand, useContextMenu, useControllableState, useDropdown, useEditor, useEscapeKey, useFileUpload, useFloatingPosition, useFocusTrap, useId, useKanban, useMenu, useMobileMenu, useModal, useNavbar, useNodeRegistry, useOutsideClick, usePanZoom, usePopover, useSidebar, useTabs, useToast, useTreeNav };
|
|
2866
|
+
export { Accordion, type AccordionContentProps, type AccordionContextValue, type AccordionItemProps, type AccordionOrientation, AccordionPanel, AccordionPanelContent, type AccordionPanelContentProps, type AccordionPanelProps, AccordionPanelSection, type AccordionPanelSectionProps, AccordionPanelTrigger, type AccordionPanelTriggerProps, 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, 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, ChatDrawer, type ChatDrawerProps, type ChatDrawerTab, 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, type ControlledAdapterHandle, DatePicker, type DatePickerProps, type DateRange, type DropPosition, Dropdown, type DropdownContextValue, type DropdownItemProps, type DropdownItemsProps, type DropdownProps, type DropdownSeparatorProps, type DropdownTriggerProps, EMOJI_CATEGORY_ORDER, EMOJI_DATA, EMOJI_ENTRIES, Editor, type EditorAction, type EditorContentProps, type EditorContextValue, type EditorProps, type EditorToolbarProps, Emoji, type EmojiCategory, type EmojiCategoryKey, type EmojiEntry, type EmojiFlatEntry, type EmojiProps, EmojiSelect, type EmojiSelectProps, 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, InputTag, type InputTagAdapter, type InputTagAdapterState, type InputTagProps, type InputTagTrigger, type InputTagTriggers, Kanban, type KanbanCardMoveHandler, type KanbanCardProps, type KanbanColumnHandleProps, type KanbanColumnMoveHandler, type KanbanColumnProps, type KanbanContextValue, type KanbanProps, MagicWand, type MagicWandAction, type MagicWandAppearance, type MagicWandProps, type MagicWandSelection, 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, MoodMeter, type MoodMeterProps, 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, type PromptAttachment, type PromptCmd, PromptInput, type PromptInputProps, type PromptMention, RadioGroup, type RadioGroupProps, ReasonTag, type ReasonTagProps, type ReasonTagSource, type ReasonTagTheme, type RenderExtension, type RenderExtensionProps, SKIN_TONES, type SectionRenderState, type SectionRenderable, 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, type SkinTone, 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, TimeGrid, type TimeGridProps, type TimeGridTone, TimePicker, type TimePickerProps, Timeline, type TimelineBlockProps, type TimelineEvent, type TimelineItemProps, type TimelineOrientation, type TimelineProps, type TimelineVariant, Toast, type ToastContextValue, type ToastData, type ToastPosition, type ToastProviderProps, type ToastVariant, Tooltip, type TooltipProps, TreeNav, type TreeNavContextValue, type TreeNavProps, type TreeNodeData, type TreeNodeProps, type Variant, applyTone, cn, configureIcons, contentEditableAdapter, controlledAdapter, find, hasSkinTones, inputAdapter, registerExtension, registerExtensions, registerIconSet, registerIcons, resolve, sanitizeHref, sanitizeHtml, search, skinTones, textareaAdapter, useAccordion, useAccordionPanel, useAccordionSection, useAnimation, useCarousel, useCommand, useContextMenu, useControllableState, useDropdown, useEditor, useEscapeKey, useFileUpload, useFloatingPosition, useFocusTrap, useId, useKanban, useMenu, useMobileMenu, useModal, useNavbar, useNodeRegistry, useOutsideClick, usePanZoom, usePopover, useSidebar, useTabs, useToast, useTreeNav };
|
package/dist/index.js
CHANGED
|
@@ -6652,6 +6652,127 @@ var Timeline = Object.assign(TimelineRoot, {
|
|
|
6652
6652
|
Item: TimelineItem,
|
|
6653
6653
|
Block: TimelineBlock
|
|
6654
6654
|
});
|
|
6655
|
+
var TONE_CLASSES = {
|
|
6656
|
+
violet: "bg-violet-500 hover:bg-violet-600",
|
|
6657
|
+
emerald: "bg-emerald-500 hover:bg-emerald-600",
|
|
6658
|
+
sky: "bg-sky-500 hover:bg-sky-600",
|
|
6659
|
+
rose: "bg-rose-500 hover:bg-rose-600",
|
|
6660
|
+
amber: "bg-amber-500 hover:bg-amber-600",
|
|
6661
|
+
indigo: "bg-indigo-500 hover:bg-indigo-600",
|
|
6662
|
+
blue: "bg-blue-500 hover:bg-blue-600",
|
|
6663
|
+
zinc: "bg-zinc-500 hover:bg-zinc-600"
|
|
6664
|
+
};
|
|
6665
|
+
var OFF_CLASSES = "bg-zinc-100 hover:bg-zinc-200 dark:bg-zinc-800 dark:hover:bg-zinc-700";
|
|
6666
|
+
var TimeGrid = forwardRef(
|
|
6667
|
+
({
|
|
6668
|
+
rows,
|
|
6669
|
+
cols,
|
|
6670
|
+
value,
|
|
6671
|
+
onChange,
|
|
6672
|
+
toneOn = "violet",
|
|
6673
|
+
cellWidth = 20,
|
|
6674
|
+
cellHeight = 16,
|
|
6675
|
+
sparseColLabels = true,
|
|
6676
|
+
toggleStripsOnHeaderClick = true,
|
|
6677
|
+
ariaCell,
|
|
6678
|
+
cellId,
|
|
6679
|
+
className
|
|
6680
|
+
}, ref) => {
|
|
6681
|
+
const [drag, setDrag] = useState(null);
|
|
6682
|
+
const setCell = (r, c, v) => {
|
|
6683
|
+
if (value[r]?.[c] === v) return;
|
|
6684
|
+
const next = value.map((row) => row.slice());
|
|
6685
|
+
next[r][c] = v;
|
|
6686
|
+
onChange(next);
|
|
6687
|
+
};
|
|
6688
|
+
const toggleRow = (r) => {
|
|
6689
|
+
if (!toggleStripsOnHeaderClick) return;
|
|
6690
|
+
const all = value[r].every(Boolean);
|
|
6691
|
+
const next = value.map((row) => row.slice());
|
|
6692
|
+
for (let c = 0; c < cols.length; c++) next[r][c] = !all;
|
|
6693
|
+
onChange(next);
|
|
6694
|
+
};
|
|
6695
|
+
const toggleCol = (c) => {
|
|
6696
|
+
if (!toggleStripsOnHeaderClick) return;
|
|
6697
|
+
const all = value.every((row) => row[c]);
|
|
6698
|
+
const next = value.map((row) => row.slice());
|
|
6699
|
+
for (let r = 0; r < rows.length; r++) next[r][c] = !all;
|
|
6700
|
+
onChange(next);
|
|
6701
|
+
};
|
|
6702
|
+
const colStep = Math.max(1, Math.floor(cols.length / 6));
|
|
6703
|
+
const onTone = TONE_CLASSES[toneOn];
|
|
6704
|
+
return /* @__PURE__ */ jsx(
|
|
6705
|
+
"div",
|
|
6706
|
+
{
|
|
6707
|
+
ref,
|
|
6708
|
+
"data-react-fancy-timegrid": "",
|
|
6709
|
+
className: cn(
|
|
6710
|
+
"select-none overflow-x-auto",
|
|
6711
|
+
className
|
|
6712
|
+
),
|
|
6713
|
+
onMouseLeave: () => setDrag(null),
|
|
6714
|
+
onMouseUp: () => setDrag(null),
|
|
6715
|
+
children: /* @__PURE__ */ jsxs("table", { className: "text-[10px]", children: [
|
|
6716
|
+
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
|
|
6717
|
+
/* @__PURE__ */ jsx("th", {}),
|
|
6718
|
+
cols.map((label, c) => /* @__PURE__ */ jsx(
|
|
6719
|
+
"th",
|
|
6720
|
+
{
|
|
6721
|
+
onClick: () => toggleCol(c),
|
|
6722
|
+
style: { width: cellWidth },
|
|
6723
|
+
"data-react-fancy-timegrid-col": c,
|
|
6724
|
+
className: cn(
|
|
6725
|
+
"text-zinc-400",
|
|
6726
|
+
toggleStripsOnHeaderClick && "cursor-pointer hover:text-zinc-700 dark:hover:text-zinc-200"
|
|
6727
|
+
),
|
|
6728
|
+
children: sparseColLabels ? c % colStep === 0 ? label : "" : label
|
|
6729
|
+
},
|
|
6730
|
+
c
|
|
6731
|
+
))
|
|
6732
|
+
] }) }),
|
|
6733
|
+
/* @__PURE__ */ jsx("tbody", { children: rows.map((label, r) => /* @__PURE__ */ jsxs("tr", { children: [
|
|
6734
|
+
/* @__PURE__ */ jsx(
|
|
6735
|
+
"th",
|
|
6736
|
+
{
|
|
6737
|
+
onClick: () => toggleRow(r),
|
|
6738
|
+
"data-react-fancy-timegrid-row": r,
|
|
6739
|
+
className: cn(
|
|
6740
|
+
"pr-1 text-right font-medium text-zinc-500",
|
|
6741
|
+
toggleStripsOnHeaderClick && "cursor-pointer hover:text-zinc-800 dark:hover:text-zinc-200"
|
|
6742
|
+
),
|
|
6743
|
+
children: label
|
|
6744
|
+
}
|
|
6745
|
+
),
|
|
6746
|
+
cols.map((_, c) => {
|
|
6747
|
+
const on = value[r]?.[c] ?? false;
|
|
6748
|
+
return /* @__PURE__ */ jsx("td", { className: "p-px", children: /* @__PURE__ */ jsx(
|
|
6749
|
+
"button",
|
|
6750
|
+
{
|
|
6751
|
+
type: "button",
|
|
6752
|
+
onMouseDown: () => {
|
|
6753
|
+
const v = !on;
|
|
6754
|
+
setDrag(v);
|
|
6755
|
+
setCell(r, c, v);
|
|
6756
|
+
},
|
|
6757
|
+
onMouseEnter: () => drag !== null && setCell(r, c, drag),
|
|
6758
|
+
style: { width: cellWidth, height: cellHeight },
|
|
6759
|
+
"data-react-fancy-timegrid-cell": cellId ? cellId(r, c) : `${r}:${c}`,
|
|
6760
|
+
"aria-pressed": on,
|
|
6761
|
+
"aria-label": ariaCell ? ariaCell(r, c, on) : `${rows[r]} ${cols[c]} ${on ? "on" : "off"}`,
|
|
6762
|
+
className: cn(
|
|
6763
|
+
"block rounded-sm transition",
|
|
6764
|
+
on ? onTone : OFF_CLASSES
|
|
6765
|
+
)
|
|
6766
|
+
}
|
|
6767
|
+
) }, c);
|
|
6768
|
+
})
|
|
6769
|
+
] }, r)) })
|
|
6770
|
+
] })
|
|
6771
|
+
}
|
|
6772
|
+
);
|
|
6773
|
+
}
|
|
6774
|
+
);
|
|
6775
|
+
TimeGrid.displayName = "TimeGrid";
|
|
6655
6776
|
var Tooltip = forwardRef(
|
|
6656
6777
|
function Tooltip2({ children, content, placement = "top", delay = 200, offset = 8, className }, _ref) {
|
|
6657
6778
|
const [open, setOpen] = useState(false);
|
|
@@ -13091,6 +13212,6 @@ function caretRect(ta, start, end) {
|
|
|
13091
13212
|
return { x, y };
|
|
13092
13213
|
}
|
|
13093
13214
|
|
|
13094
|
-
export { Accordion, AccordionPanel, AccordionPanelContent, AccordionPanelSection, AccordionPanelTrigger, Action, Autocomplete, Avatar, Badge, Brand, Breadcrumbs, Calendar, Callout, Card, Carousel, Chart, ChatDrawer, Checkbox, CheckboxGroup, ColorPicker, Command, Composer, ContentRenderer, ContextMenu, DatePicker, Dropdown, EMOJI_CATEGORY_ORDER, EMOJI_DATA, EMOJI_ENTRIES, Editor, Emoji, EmojiSelect, Field, FileUpload, Heading, Icon, Input, InputTag, Kanban, MagicWand, Menu2 as Menu, MobileMenu, Modal, MoodMeter, MultiSwitch, Navbar, OtpInput, Pagination, Pillbox, Popover, Portal, Profile, Progress, PromptInput, RadioGroup, ReasonTag, SKIN_TONES, Select, Separator, Sidebar, Skeleton, Slider, Switch, Table, Tabs, Text, Textarea, TimePicker, Timeline, Toast, Tooltip, TreeNav, applyTone, cn, configureIcons, contentEditableAdapter, controlledAdapter, find, hasSkinTones, inputAdapter, registerExtension, registerExtensions, registerIconSet, registerIcons, resolve, sanitizeHref, sanitizeHtml, search, skinTones, textareaAdapter, useAccordion, useAccordionPanel, useAccordionSection, useAnimation, useCarousel, useCommand, useContextMenu, useControllableState, useDropdown, useEditor, useEscapeKey, useFileUpload, useFloatingPosition, useFocusTrap, useId12 as useId, useKanban, useMenu, useMobileMenu, useModal, useNavbar, useNodeRegistry, useOutsideClick, usePanZoom, usePopover, useSidebar, useTabs, useToast, useTreeNav };
|
|
13215
|
+
export { Accordion, AccordionPanel, AccordionPanelContent, AccordionPanelSection, AccordionPanelTrigger, Action, Autocomplete, Avatar, Badge, Brand, Breadcrumbs, Calendar, Callout, Card, Carousel, Chart, ChatDrawer, Checkbox, CheckboxGroup, ColorPicker, Command, Composer, ContentRenderer, ContextMenu, DatePicker, Dropdown, EMOJI_CATEGORY_ORDER, EMOJI_DATA, EMOJI_ENTRIES, Editor, Emoji, EmojiSelect, Field, FileUpload, Heading, Icon, Input, InputTag, Kanban, MagicWand, Menu2 as Menu, MobileMenu, Modal, MoodMeter, MultiSwitch, Navbar, OtpInput, Pagination, Pillbox, Popover, Portal, Profile, Progress, PromptInput, RadioGroup, ReasonTag, SKIN_TONES, Select, Separator, Sidebar, Skeleton, Slider, Switch, Table, Tabs, Text, Textarea, TimeGrid, TimePicker, Timeline, Toast, Tooltip, TreeNav, applyTone, cn, configureIcons, contentEditableAdapter, controlledAdapter, find, hasSkinTones, inputAdapter, registerExtension, registerExtensions, registerIconSet, registerIcons, resolve, sanitizeHref, sanitizeHtml, search, skinTones, textareaAdapter, useAccordion, useAccordionPanel, useAccordionSection, useAnimation, useCarousel, useCommand, useContextMenu, useControllableState, useDropdown, useEditor, useEscapeKey, useFileUpload, useFloatingPosition, useFocusTrap, useId12 as useId, useKanban, useMenu, useMobileMenu, useModal, useNavbar, useNodeRegistry, useOutsideClick, usePanZoom, usePopover, useSidebar, useTabs, useToast, useTreeNav };
|
|
13095
13216
|
//# sourceMappingURL=index.js.map
|
|
13096
13217
|
//# sourceMappingURL=index.js.map
|