@zuzjs/ui 1.0.4 → 1.0.6

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 react__default, { ElementType, ComponentPropsWithoutRef, Ref, ReactNode, FC, MouseEvent as MouseEvent$1, CSSProperties, FormEventHandler, RefObject, JSX, HTMLAttributes, ComponentPropsWithRef } from 'react';
2
+ import react__default, { ElementType, ComponentPropsWithoutRef, Ref, ReactNode, MouseEvent as MouseEvent$1, RefObject, FC, CSSProperties, FormEventHandler, JSX, HTMLAttributes, ComponentPropsWithRef } from 'react';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import * as _zuzjs_hooks from '@zuzjs/hooks';
5
5
  import { LineChartProps, Command } from '@zuzjs/hooks';
@@ -47,6 +47,20 @@ declare const Position: {
47
47
  readonly Left: "left";
48
48
  readonly Right: "right";
49
49
  };
50
+ declare const ORIGIN: {
51
+ readonly TopLeft: "top left";
52
+ readonly TopRight: "top right";
53
+ readonly TopCenter: "top center";
54
+ readonly BottomLeft: "bottom left";
55
+ readonly BottomRight: "bottom right";
56
+ };
57
+ declare const OriginType: {
58
+ readonly TopLeft: "top left";
59
+ readonly TopRight: "top right";
60
+ readonly TopCenter: "top center";
61
+ readonly BottomLeft: "bottom left";
62
+ readonly BottomRight: "bottom right";
63
+ };
50
64
  declare const Variant: {
51
65
  readonly XSmall: "xs";
52
66
  readonly Small: "sm";
@@ -92,6 +106,7 @@ declare const TRANSITION_CURVES: {
92
106
  readonly Spring: "SPRING";
93
107
  readonly Liquid: "LIQUID";
94
108
  readonly EaseInOut: "EASEINOUT";
109
+ readonly EaseOutBack: "EASEOUTBACK";
95
110
  readonly Bounce: "BOUNCE";
96
111
  };
97
112
  declare const TRANSITIONS: {
@@ -591,23 +606,31 @@ interface ContextItem {
591
606
  onSelect: () => void;
592
607
  }
593
608
  type ContextMenuProps = BoxProps & {
594
- parent?: HTMLElement;
609
+ id?: number;
610
+ event?: MouseEvent$1<Element, MouseEvent> | TouchEvent;
611
+ parent?: RefObject<HTMLElement | null>;
612
+ origin?: ValueOf<typeof ORIGIN>;
595
613
  items?: ContextItem[];
596
614
  offsetX?: number;
597
615
  offsetY?: number;
598
616
  header?: ReactNode | FC;
599
617
  footer?: ReactNode | FC;
618
+ when?: boolean;
619
+ onClose?: (id: number) => void;
600
620
  };
601
621
  type MenuItemProps = ContextItem & {
602
622
  index: number;
603
623
  className: string;
604
624
  };
605
625
  interface ContextMenuHandler {
606
- show: (e: MouseEvent$1<Element, MouseEvent$1> | TouchEvent, items?: ContextItem[]) => void;
626
+ show: (e: MouseEvent$1<Element, MouseEvent> | TouchEvent, items?: ContextItem[]) => void;
607
627
  hide: (e: MouseEvent$1 | TouchEvent) => void;
608
628
  }
609
629
 
610
- declare const ContextMenu: react.ForwardRefExoticComponent<Omit<ContextMenuProps, "ref"> & react.RefAttributes<ContextMenuHandler>>;
630
+ declare const ContextMenu: {
631
+ ({ ref, ...props }: ContextMenuProps & {}): react_jsx_runtime.JSX.Element;
632
+ displayName: string;
633
+ };
611
634
 
612
635
  type CookieConsentProps = {
613
636
  title?: string;
@@ -684,11 +707,6 @@ type DialogProps = ZuzProps & {
684
707
  onShow?: () => void;
685
708
  onHide?: () => void;
686
709
  };
687
- interface DialogController {
688
- add: (toast: Omit<DialogProps, 'id'>) => number;
689
- remove: (id: number) => void;
690
- clear: () => void;
691
- }
692
710
  interface DialogActionHandler {
693
711
  key?: string;
694
712
  label: string;
@@ -704,20 +722,6 @@ interface DialogHandler {
704
722
  warn: (message: string | ReactNode, duration?: number) => void;
705
723
  hide: () => void;
706
724
  }
707
- interface DialogContextType extends DialogController {
708
- fx: {
709
- curve: ValueOf<typeof TRANSITION_CURVES>;
710
- duration: number;
711
- };
712
- }
713
-
714
- declare const SheetProvider: FC<{
715
- children: ReactNode;
716
- fx?: {
717
- curve: ValueOf<typeof TRANSITION_CURVES>;
718
- duration: number;
719
- };
720
- }>;
721
725
 
722
726
  declare const Dialog: {
723
727
  ({ ref, ...props }: DialogProps & {
@@ -729,6 +733,8 @@ declare const Dialog: {
729
733
  };
730
734
 
731
735
  type DrawerProps = BoxProps & {
736
+ id?: number;
737
+ index?: number;
732
738
  as?: string;
733
739
  speed?: number;
734
740
  from?: ValueOf<typeof DRAWER_SIDE>;
@@ -736,14 +742,19 @@ type DrawerProps = BoxProps & {
736
742
  prerender?: boolean;
737
743
  margin?: number;
738
744
  animation?: ValueOf<typeof TRANSITION_CURVES>;
739
- onClose?: () => void;
745
+ onClose?: (id: number) => void;
740
746
  };
741
747
  interface DrawerHandler {
742
748
  open: (child?: string | ReactNode | ReactNode[]) => void;
743
749
  close: () => void;
744
750
  }
745
751
 
746
- declare const Drawer: react.ForwardRefExoticComponent<Omit<DrawerProps, "ref"> & react.RefAttributes<DrawerHandler>>;
752
+ declare const Drawer: {
753
+ ({ ref, ...props }: DrawerProps & {
754
+ ref?: Ref<HTMLDivElement>;
755
+ }): react_jsx_runtime.JSX.Element;
756
+ displayName: string;
757
+ };
747
758
 
748
759
  declare const SVGIcons: {
749
760
  colorSchemeLight: react_jsx_runtime.JSX.Element;
@@ -1377,6 +1388,18 @@ declare const ForwardedTable: <T>(props: TableProps<T> & {
1377
1388
  ref?: Ref<TableController>;
1378
1389
  }) => JSX.Element;
1379
1390
 
1391
+ type TableOfContentItem = {
1392
+ tag: string;
1393
+ label: string;
1394
+ };
1395
+ type TableOfContentsProps = BoxProps & {
1396
+ ref?: Ref<HTMLDivElement>;
1397
+ title?: ReactNode;
1398
+ items: TableOfContentItem[];
1399
+ };
1400
+
1401
+ declare const TableOfContents: ({ ref, ...props }: TableOfContentsProps) => react_jsx_runtime.JSX.Element;
1402
+
1380
1403
  interface TabBodyProps {
1381
1404
  isActive: boolean;
1382
1405
  transitionType?: "slide" | "fade" | "scale";
@@ -1492,6 +1515,29 @@ declare const TabView: {
1492
1515
  displayName: string;
1493
1516
  };
1494
1517
 
1518
+ interface TerminalHandler {
1519
+ push: (line: TerminalLine | string) => void;
1520
+ clear: () => void;
1521
+ }
1522
+ type TerminalLine = {
1523
+ type: 'command' | 'output' | 'error' | 'success';
1524
+ content: string;
1525
+ };
1526
+ interface TerminalProps {
1527
+ commands?: TerminalCommands;
1528
+ onCommand?: (cmd: string) => string | Promise<string>;
1529
+ welcomeMessage?: string;
1530
+ prompt?: string;
1531
+ className?: string;
1532
+ variant?: ValueOf<typeof Variant>;
1533
+ }
1534
+ type TerminalCommandFn = (args: string[]) => string | Promise<string>;
1535
+ type TerminalCommands = Record<string, TerminalCommandFn>;
1536
+
1537
+ declare const Terminal: ({ ref, commands, onCommand, welcomeMessage, prompt, variant, ...props }: TerminalProps & {
1538
+ ref?: Ref<TerminalHandler>;
1539
+ }) => react_jsx_runtime.JSX.Element;
1540
+
1495
1541
  declare const Text: react.ForwardRefExoticComponent<ZuzProps & Omit<Omit<react.DetailedHTMLProps<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref">, keyof ZuzProps> & {
1496
1542
  h?: number;
1497
1543
  html?: ReactNode | string;
@@ -1558,33 +1604,19 @@ declare enum ToastType {
1558
1604
  Promise = "promise"
1559
1605
  }
1560
1606
  declare const ToastDefaultTitle: dynamic;
1561
- interface ToastData {
1562
- id: number;
1607
+ interface ToastProps {
1608
+ id?: number;
1563
1609
  type: ToastType;
1564
1610
  icon?: string;
1565
1611
  title?: string | ReactNode;
1566
1612
  message?: string | ReactNode;
1567
1613
  duration?: number;
1614
+ onClose?: (id: number) => void;
1568
1615
  onClick?: () => void;
1569
1616
  }
1570
- interface ToastController {
1571
- add: (toast: Omit<ToastData, 'id'>) => number;
1572
- remove: (id: number) => void;
1573
- clear: () => void;
1574
- }
1575
- interface ToastContextType extends ToastController {
1576
- fx: {
1577
- curve: ValueOf<typeof TRANSITION_CURVES>;
1578
- duration: number;
1579
- };
1580
- }
1581
1617
 
1582
- declare const ToastProvider: FC<{
1583
- children: ReactNode;
1584
- fx?: {
1585
- curve: ValueOf<typeof TRANSITION_CURVES>;
1586
- duration: number;
1587
- };
1618
+ declare const Toast: FC<ToastProps & {
1619
+ index: number;
1588
1620
  }>;
1589
1621
 
1590
1622
  type ToolTipProps = BoxProps & {
@@ -1663,6 +1695,10 @@ interface ThemeConfig {
1663
1695
  spinner?: {
1664
1696
  type?: ValueOf<typeof SPINNER>;
1665
1697
  };
1698
+ toast?: {
1699
+ curve?: ValueOf<typeof TRANSITION_CURVES>;
1700
+ duration?: number;
1701
+ };
1666
1702
  }
1667
1703
  type ThemeProviderProps = {
1668
1704
  children: ReactNode;
@@ -1705,13 +1741,39 @@ declare const useToast: () => {
1705
1741
  clearAll: () => void;
1706
1742
  };
1707
1743
 
1744
+ declare const useDrawer: () => {
1745
+ clearAll: () => void;
1746
+ open: (child?: string | ReactNode | ReactNode[]) => number;
1747
+ right: (child?: string | ReactNode | ReactNode[]) => number;
1748
+ left: (child?: string | ReactNode | ReactNode[]) => number;
1749
+ top: (child?: string | ReactNode | ReactNode[]) => number;
1750
+ bottom: (child?: string | ReactNode | ReactNode[]) => number;
1751
+ close: (id: number) => void;
1752
+ };
1753
+
1708
1754
  declare const useFx: (fx?: animationProps, ref?: RefObject<HTMLElement>) => {
1709
1755
  style: any;
1710
1756
  };
1711
1757
 
1712
- declare const useContextMenu: (menu: RefObject<ContextMenuHandler | null>) => {
1713
- show: (e: MouseEvent$1<Element, MouseEvent$1> | TouchEvent, items?: ContextItem[]) => void;
1714
- hide: (e: MouseEvent$1 | TouchEvent) => void;
1758
+ type MorphOptions = {
1759
+ duration?: number;
1760
+ curve?: ValueOf<typeof TRANSITION_CURVES>;
1761
+ borderRadius?: {
1762
+ from: number;
1763
+ to: number;
1764
+ };
1765
+ targetWidth?: number;
1766
+ };
1767
+ declare const useMorph: (sourceRef: RefObject<HTMLElement | null>, active: boolean, options?: MorphOptions) => {
1768
+ style: any;
1769
+ isMeasured: boolean;
1770
+ sourceRect: DOMRect | null;
1771
+ };
1772
+
1773
+ declare const useContextMenu: () => {
1774
+ showContextMenu: (e: MouseEvent$1<Element, MouseEvent> | TouchEvent, items: ContextItem[], origin?: ValueOf<typeof ORIGIN>) => void;
1775
+ showMenu: (ref: RefObject<HTMLElement | null>, items: ContextItem[], origin?: ValueOf<typeof ORIGIN>) => void;
1776
+ hide: () => void;
1715
1777
  };
1716
1778
 
1717
1779
  declare const PACKAGE_NAME: string;
@@ -1729,7 +1791,6 @@ declare const buildClassString: (input: ZuzStyleString | ZuzStyleString[]) => st
1729
1791
  */
1730
1792
  declare const css: (input: ZuzStyleString | ZuzStyleString[]) => string;
1731
1793
  declare const buildWithStyles: (source: dynamic) => dynamic;
1732
- declare const _buildWithStyles: (source: dynamic) => dynamic;
1733
1794
  declare const getAnimationCurve: (curve?: string | ValueOf<typeof TRANSITION_CURVES>) => string;
1734
1795
  declare const animationTransition: (transition: ValueOf<typeof TRANSITIONS>, offset?: number) => {
1735
1796
  from: {};
@@ -1737,4 +1798,4 @@ declare const animationTransition: (transition: ValueOf<typeof TRANSITIONS>, off
1737
1798
  };
1738
1799
  declare const getAnimationTransition: (transition: ValueOf<typeof TRANSITIONS>, to?: boolean, from?: boolean) => dynamic;
1739
1800
 
1740
- export { ALERT, AVATAR, Accordion, type AccordionHandler, type AccordionProps, ActionBar, type ActionBarHandler, type ActionBarItem, type ActionBarProps, Alert, type AlertHandler, type AlertProps, AutoComplete, type AutoCompleteProps, Avatar, type AvatarHandler, type AvatarProps, Badge, type BadgeProps, Box, type BoxProps, Bubble, BubbleMediaType, type BubbleProps, BubbleStatus, Button, type ButtonHandler, type ButtonProps, ButtonState, CHART, CHECKBOX, COLORTHEME, Calendar, type CalendarProps, Chart, type ChartProps, CheckBox, type CheckBoxProps, type CheckboxHandler, CodeBlock, type CodeBlockProps, ColorScheme$1 as ColorScheme, type Column, type ContextItem, ContextMenu, type ContextMenuHandler, type ContextMenuProps, type CookieConsentProps, CookiesConsent, Cover, type CoverProps, type CropHandler, CropShape, Cropper, type CropperProps, Crumb, type CrumbItem, type CrumbProps, DATATYPE, DIALOG, DIALOG_ACTION_POSITION, DRAWER_SIDE, DatePicker, Dialog, type DialogActionHandler, type DialogContextType, type DialogController, type DialogHandler, type DialogProps, SheetProvider as DialogProvider, Drawer, type DrawerHandler, type DrawerProps, FILTER, FORMVALIDATION, FORMVALIDATION_STYLE, Fab, type FabProps, type FilterProps, Filters, Form, type FormHandler, type FormInputs, type FormProps, Group, type GroupProps, Icon, type IconProps, Image, type ImageProps, Input, type InputProps, type KeyCombination, type KeyboardKey, type KeyboardKeyProps, KeyBoardKeys as KeyboardKeys, KeysLabelMap, KeysMap, Label, type LabelProps, List, type ListItem, type ListItemObject, type ListProps, type MenuItemProps, type NetworkManagerprops, NetworkManager as NetworkStatus, type Option, type OptionItemProps, Overlay, type OverlayProps, PACKAGE_NAME, POSITION, PROGRESS, Pagination, type PaginationCallback, type PaginationPage, type PaginationPageItem, type PaginationProps, PaginationStyle, Password, type PasswordProps, PinInput, type PinInputProps, Position, ProgressBar, type ProgressBarProps, type ProgressHandler, type Props, RADIO, Radio, type RadioHandler, type RadioProps, type Row, type RowSelectCallback, SHEET, SHEET_ACTION_POSITION, SKELETON, SLIDER, SORT, SPINNER, ScrollView, type ScrollViewProps, Search, type SearchHandler, type SearchProps, type Segment, type SegmentController, type SegmentItemProps, type SegmentProps, Select, type SelectHandler, type SelectProps, Segmented as SelectTabs, Sheet, type SheetHandler, type SheetProps, type Skeleton, Slider, type SliderProps, Span, type SpanProps, Spinner, type SpinnerProps, Status, Switch, TRANSITIONS, TRANSITION_CURVES, type Tab, type TabBodyProps, type TabProps, TabView, type TabViewHandler, type TabViewProps, ForwardedTable as Table, type TableController, type TableProps, type TableSortCallback, Text, type TextAreaProps, TextWheel, type TextWheelHandler, type TextWheelProps, TextArea as Textarea, ThemeProvider, type ToastContextType, type ToastController, type ToastData, ToastDefaultTitle, ToastProvider, ToastType, ToolTip, type ToolTipProps, type TreeItemHandler, type TreeItemProps, type TreeNode, type TreeNodeIcons, TreeView, type TreeViewHandler, type TreeViewProps, type Value, type ValueOf, Variant, type ZuzCommonValues, type ZuzProps, type ZuzStyleString, _buildWithStyles, type animationProps, animationTransition, buildClassString, buildWithStyles, cleanProps, css, type cssShortKey, type cssShortKeys, type dynamic, getAnimationCurve, getAnimationTransition, getZuzMap, isKeyCombination, type parallaxEffectProps, setZuzMap, splitAtoms, useBase, useContextMenu, useDialog, useFx, usePosition, useToast };
1801
+ export { ALERT, AVATAR, Accordion, type AccordionHandler, type AccordionProps, ActionBar, type ActionBarHandler, type ActionBarItem, type ActionBarProps, Alert, type AlertHandler, type AlertProps, AutoComplete, type AutoCompleteProps, Avatar, type AvatarHandler, type AvatarProps, Badge, type BadgeProps, Box, type BoxProps, Bubble, BubbleMediaType, type BubbleProps, BubbleStatus, Button, type ButtonHandler, type ButtonProps, ButtonState, CHART, CHECKBOX, COLORTHEME, Calendar, type CalendarProps, Chart, type ChartProps, CheckBox, type CheckBoxProps, type CheckboxHandler, CodeBlock, type CodeBlockProps, ColorScheme$1 as ColorScheme, type Column, type ContextItem, ContextMenu, type ContextMenuHandler, type ContextMenuProps, type CookieConsentProps, CookiesConsent, Cover, type CoverProps, type CropHandler, CropShape, Cropper, type CropperProps, Crumb, type CrumbItem, type CrumbProps, DATATYPE, DIALOG, DIALOG_ACTION_POSITION, DRAWER_SIDE, DatePicker, Dialog, type DialogActionHandler, type DialogHandler, type DialogProps, Drawer, type DrawerHandler, type DrawerProps, FILTER, FORMVALIDATION, FORMVALIDATION_STYLE, Fab, type FabProps, type FilterProps, Filters, Form, type FormHandler, type FormInputs, type FormProps, Group, type GroupProps, Icon, type IconProps, Image, type ImageProps, Input, type InputProps, type KeyCombination, type KeyboardKey, type KeyboardKeyProps, KeyBoardKeys as KeyboardKeys, KeysLabelMap, KeysMap, Label, type LabelProps, List, type ListItem, type ListItemObject, type ListProps, type MenuItemProps, type MorphOptions, type NetworkManagerprops, NetworkManager as NetworkStatus, ORIGIN, type Option, type OptionItemProps, OriginType, Overlay, type OverlayProps, PACKAGE_NAME, POSITION, PROGRESS, Pagination, type PaginationCallback, type PaginationPage, type PaginationPageItem, type PaginationProps, PaginationStyle, Password, type PasswordProps, PinInput, type PinInputProps, Position, ProgressBar, type ProgressBarProps, type ProgressHandler, type Props, RADIO, Radio, type RadioHandler, type RadioProps, type Row, type RowSelectCallback, SHEET, SHEET_ACTION_POSITION, SKELETON, SLIDER, SORT, SPINNER, ScrollView, type ScrollViewProps, Search, type SearchHandler, type SearchProps, type Segment, type SegmentController, type SegmentItemProps, type SegmentProps, Select, type SelectHandler, type SelectProps, Segmented as SelectTabs, Sheet, type SheetHandler, type SheetProps, type Skeleton, Slider, type SliderProps, Span, type SpanProps, Spinner, type SpinnerProps, Status, Switch, TRANSITIONS, TRANSITION_CURVES, type Tab, type TabBodyProps, type TabProps, TabView, type TabViewHandler, type TabViewProps, ForwardedTable as Table, type TableController, type TableOfContentItem, TableOfContents, type TableOfContentsProps, type TableProps, type TableSortCallback, Terminal, type TerminalCommandFn, type TerminalCommands, type TerminalHandler, type TerminalLine, type TerminalProps, Text, type TextAreaProps, TextWheel, type TextWheelHandler, type TextWheelProps, TextArea as Textarea, ThemeProvider, ToastDefaultTitle, type ToastProps, Toast as ToastProvider, ToastType, ToolTip, type ToolTipProps, type TreeItemHandler, type TreeItemProps, type TreeNode, type TreeNodeIcons, TreeView, type TreeViewHandler, type TreeViewProps, type Value, type ValueOf, Variant, type ZuzCommonValues, type ZuzProps, type ZuzStyleString, type animationProps, animationTransition, buildClassString, buildWithStyles, cleanProps, css, type cssShortKey, type cssShortKeys, type dynamic, getAnimationCurve, getAnimationTransition, getZuzMap, isKeyCombination, type parallaxEffectProps, setZuzMap, splitAtoms, useBase, useContextMenu, useDialog, useDrawer, useFx, useMorph, usePosition, useToast };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react from 'react';
2
- import react__default, { ElementType, ComponentPropsWithoutRef, Ref, ReactNode, FC, MouseEvent as MouseEvent$1, CSSProperties, FormEventHandler, RefObject, JSX, HTMLAttributes, ComponentPropsWithRef } from 'react';
2
+ import react__default, { ElementType, ComponentPropsWithoutRef, Ref, ReactNode, MouseEvent as MouseEvent$1, RefObject, FC, CSSProperties, FormEventHandler, JSX, HTMLAttributes, ComponentPropsWithRef } from 'react';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import * as _zuzjs_hooks from '@zuzjs/hooks';
5
5
  import { LineChartProps, Command } from '@zuzjs/hooks';
@@ -47,6 +47,20 @@ declare const Position: {
47
47
  readonly Left: "left";
48
48
  readonly Right: "right";
49
49
  };
50
+ declare const ORIGIN: {
51
+ readonly TopLeft: "top left";
52
+ readonly TopRight: "top right";
53
+ readonly TopCenter: "top center";
54
+ readonly BottomLeft: "bottom left";
55
+ readonly BottomRight: "bottom right";
56
+ };
57
+ declare const OriginType: {
58
+ readonly TopLeft: "top left";
59
+ readonly TopRight: "top right";
60
+ readonly TopCenter: "top center";
61
+ readonly BottomLeft: "bottom left";
62
+ readonly BottomRight: "bottom right";
63
+ };
50
64
  declare const Variant: {
51
65
  readonly XSmall: "xs";
52
66
  readonly Small: "sm";
@@ -92,6 +106,7 @@ declare const TRANSITION_CURVES: {
92
106
  readonly Spring: "SPRING";
93
107
  readonly Liquid: "LIQUID";
94
108
  readonly EaseInOut: "EASEINOUT";
109
+ readonly EaseOutBack: "EASEOUTBACK";
95
110
  readonly Bounce: "BOUNCE";
96
111
  };
97
112
  declare const TRANSITIONS: {
@@ -591,23 +606,31 @@ interface ContextItem {
591
606
  onSelect: () => void;
592
607
  }
593
608
  type ContextMenuProps = BoxProps & {
594
- parent?: HTMLElement;
609
+ id?: number;
610
+ event?: MouseEvent$1<Element, MouseEvent> | TouchEvent;
611
+ parent?: RefObject<HTMLElement | null>;
612
+ origin?: ValueOf<typeof ORIGIN>;
595
613
  items?: ContextItem[];
596
614
  offsetX?: number;
597
615
  offsetY?: number;
598
616
  header?: ReactNode | FC;
599
617
  footer?: ReactNode | FC;
618
+ when?: boolean;
619
+ onClose?: (id: number) => void;
600
620
  };
601
621
  type MenuItemProps = ContextItem & {
602
622
  index: number;
603
623
  className: string;
604
624
  };
605
625
  interface ContextMenuHandler {
606
- show: (e: MouseEvent$1<Element, MouseEvent$1> | TouchEvent, items?: ContextItem[]) => void;
626
+ show: (e: MouseEvent$1<Element, MouseEvent> | TouchEvent, items?: ContextItem[]) => void;
607
627
  hide: (e: MouseEvent$1 | TouchEvent) => void;
608
628
  }
609
629
 
610
- declare const ContextMenu: react.ForwardRefExoticComponent<Omit<ContextMenuProps, "ref"> & react.RefAttributes<ContextMenuHandler>>;
630
+ declare const ContextMenu: {
631
+ ({ ref, ...props }: ContextMenuProps & {}): react_jsx_runtime.JSX.Element;
632
+ displayName: string;
633
+ };
611
634
 
612
635
  type CookieConsentProps = {
613
636
  title?: string;
@@ -684,11 +707,6 @@ type DialogProps = ZuzProps & {
684
707
  onShow?: () => void;
685
708
  onHide?: () => void;
686
709
  };
687
- interface DialogController {
688
- add: (toast: Omit<DialogProps, 'id'>) => number;
689
- remove: (id: number) => void;
690
- clear: () => void;
691
- }
692
710
  interface DialogActionHandler {
693
711
  key?: string;
694
712
  label: string;
@@ -704,20 +722,6 @@ interface DialogHandler {
704
722
  warn: (message: string | ReactNode, duration?: number) => void;
705
723
  hide: () => void;
706
724
  }
707
- interface DialogContextType extends DialogController {
708
- fx: {
709
- curve: ValueOf<typeof TRANSITION_CURVES>;
710
- duration: number;
711
- };
712
- }
713
-
714
- declare const SheetProvider: FC<{
715
- children: ReactNode;
716
- fx?: {
717
- curve: ValueOf<typeof TRANSITION_CURVES>;
718
- duration: number;
719
- };
720
- }>;
721
725
 
722
726
  declare const Dialog: {
723
727
  ({ ref, ...props }: DialogProps & {
@@ -729,6 +733,8 @@ declare const Dialog: {
729
733
  };
730
734
 
731
735
  type DrawerProps = BoxProps & {
736
+ id?: number;
737
+ index?: number;
732
738
  as?: string;
733
739
  speed?: number;
734
740
  from?: ValueOf<typeof DRAWER_SIDE>;
@@ -736,14 +742,19 @@ type DrawerProps = BoxProps & {
736
742
  prerender?: boolean;
737
743
  margin?: number;
738
744
  animation?: ValueOf<typeof TRANSITION_CURVES>;
739
- onClose?: () => void;
745
+ onClose?: (id: number) => void;
740
746
  };
741
747
  interface DrawerHandler {
742
748
  open: (child?: string | ReactNode | ReactNode[]) => void;
743
749
  close: () => void;
744
750
  }
745
751
 
746
- declare const Drawer: react.ForwardRefExoticComponent<Omit<DrawerProps, "ref"> & react.RefAttributes<DrawerHandler>>;
752
+ declare const Drawer: {
753
+ ({ ref, ...props }: DrawerProps & {
754
+ ref?: Ref<HTMLDivElement>;
755
+ }): react_jsx_runtime.JSX.Element;
756
+ displayName: string;
757
+ };
747
758
 
748
759
  declare const SVGIcons: {
749
760
  colorSchemeLight: react_jsx_runtime.JSX.Element;
@@ -1377,6 +1388,18 @@ declare const ForwardedTable: <T>(props: TableProps<T> & {
1377
1388
  ref?: Ref<TableController>;
1378
1389
  }) => JSX.Element;
1379
1390
 
1391
+ type TableOfContentItem = {
1392
+ tag: string;
1393
+ label: string;
1394
+ };
1395
+ type TableOfContentsProps = BoxProps & {
1396
+ ref?: Ref<HTMLDivElement>;
1397
+ title?: ReactNode;
1398
+ items: TableOfContentItem[];
1399
+ };
1400
+
1401
+ declare const TableOfContents: ({ ref, ...props }: TableOfContentsProps) => react_jsx_runtime.JSX.Element;
1402
+
1380
1403
  interface TabBodyProps {
1381
1404
  isActive: boolean;
1382
1405
  transitionType?: "slide" | "fade" | "scale";
@@ -1492,6 +1515,29 @@ declare const TabView: {
1492
1515
  displayName: string;
1493
1516
  };
1494
1517
 
1518
+ interface TerminalHandler {
1519
+ push: (line: TerminalLine | string) => void;
1520
+ clear: () => void;
1521
+ }
1522
+ type TerminalLine = {
1523
+ type: 'command' | 'output' | 'error' | 'success';
1524
+ content: string;
1525
+ };
1526
+ interface TerminalProps {
1527
+ commands?: TerminalCommands;
1528
+ onCommand?: (cmd: string) => string | Promise<string>;
1529
+ welcomeMessage?: string;
1530
+ prompt?: string;
1531
+ className?: string;
1532
+ variant?: ValueOf<typeof Variant>;
1533
+ }
1534
+ type TerminalCommandFn = (args: string[]) => string | Promise<string>;
1535
+ type TerminalCommands = Record<string, TerminalCommandFn>;
1536
+
1537
+ declare const Terminal: ({ ref, commands, onCommand, welcomeMessage, prompt, variant, ...props }: TerminalProps & {
1538
+ ref?: Ref<TerminalHandler>;
1539
+ }) => react_jsx_runtime.JSX.Element;
1540
+
1495
1541
  declare const Text: react.ForwardRefExoticComponent<ZuzProps & Omit<Omit<react.DetailedHTMLProps<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref">, keyof ZuzProps> & {
1496
1542
  h?: number;
1497
1543
  html?: ReactNode | string;
@@ -1558,33 +1604,19 @@ declare enum ToastType {
1558
1604
  Promise = "promise"
1559
1605
  }
1560
1606
  declare const ToastDefaultTitle: dynamic;
1561
- interface ToastData {
1562
- id: number;
1607
+ interface ToastProps {
1608
+ id?: number;
1563
1609
  type: ToastType;
1564
1610
  icon?: string;
1565
1611
  title?: string | ReactNode;
1566
1612
  message?: string | ReactNode;
1567
1613
  duration?: number;
1614
+ onClose?: (id: number) => void;
1568
1615
  onClick?: () => void;
1569
1616
  }
1570
- interface ToastController {
1571
- add: (toast: Omit<ToastData, 'id'>) => number;
1572
- remove: (id: number) => void;
1573
- clear: () => void;
1574
- }
1575
- interface ToastContextType extends ToastController {
1576
- fx: {
1577
- curve: ValueOf<typeof TRANSITION_CURVES>;
1578
- duration: number;
1579
- };
1580
- }
1581
1617
 
1582
- declare const ToastProvider: FC<{
1583
- children: ReactNode;
1584
- fx?: {
1585
- curve: ValueOf<typeof TRANSITION_CURVES>;
1586
- duration: number;
1587
- };
1618
+ declare const Toast: FC<ToastProps & {
1619
+ index: number;
1588
1620
  }>;
1589
1621
 
1590
1622
  type ToolTipProps = BoxProps & {
@@ -1663,6 +1695,10 @@ interface ThemeConfig {
1663
1695
  spinner?: {
1664
1696
  type?: ValueOf<typeof SPINNER>;
1665
1697
  };
1698
+ toast?: {
1699
+ curve?: ValueOf<typeof TRANSITION_CURVES>;
1700
+ duration?: number;
1701
+ };
1666
1702
  }
1667
1703
  type ThemeProviderProps = {
1668
1704
  children: ReactNode;
@@ -1705,13 +1741,39 @@ declare const useToast: () => {
1705
1741
  clearAll: () => void;
1706
1742
  };
1707
1743
 
1744
+ declare const useDrawer: () => {
1745
+ clearAll: () => void;
1746
+ open: (child?: string | ReactNode | ReactNode[]) => number;
1747
+ right: (child?: string | ReactNode | ReactNode[]) => number;
1748
+ left: (child?: string | ReactNode | ReactNode[]) => number;
1749
+ top: (child?: string | ReactNode | ReactNode[]) => number;
1750
+ bottom: (child?: string | ReactNode | ReactNode[]) => number;
1751
+ close: (id: number) => void;
1752
+ };
1753
+
1708
1754
  declare const useFx: (fx?: animationProps, ref?: RefObject<HTMLElement>) => {
1709
1755
  style: any;
1710
1756
  };
1711
1757
 
1712
- declare const useContextMenu: (menu: RefObject<ContextMenuHandler | null>) => {
1713
- show: (e: MouseEvent$1<Element, MouseEvent$1> | TouchEvent, items?: ContextItem[]) => void;
1714
- hide: (e: MouseEvent$1 | TouchEvent) => void;
1758
+ type MorphOptions = {
1759
+ duration?: number;
1760
+ curve?: ValueOf<typeof TRANSITION_CURVES>;
1761
+ borderRadius?: {
1762
+ from: number;
1763
+ to: number;
1764
+ };
1765
+ targetWidth?: number;
1766
+ };
1767
+ declare const useMorph: (sourceRef: RefObject<HTMLElement | null>, active: boolean, options?: MorphOptions) => {
1768
+ style: any;
1769
+ isMeasured: boolean;
1770
+ sourceRect: DOMRect | null;
1771
+ };
1772
+
1773
+ declare const useContextMenu: () => {
1774
+ showContextMenu: (e: MouseEvent$1<Element, MouseEvent> | TouchEvent, items: ContextItem[], origin?: ValueOf<typeof ORIGIN>) => void;
1775
+ showMenu: (ref: RefObject<HTMLElement | null>, items: ContextItem[], origin?: ValueOf<typeof ORIGIN>) => void;
1776
+ hide: () => void;
1715
1777
  };
1716
1778
 
1717
1779
  declare const PACKAGE_NAME: string;
@@ -1729,7 +1791,6 @@ declare const buildClassString: (input: ZuzStyleString | ZuzStyleString[]) => st
1729
1791
  */
1730
1792
  declare const css: (input: ZuzStyleString | ZuzStyleString[]) => string;
1731
1793
  declare const buildWithStyles: (source: dynamic) => dynamic;
1732
- declare const _buildWithStyles: (source: dynamic) => dynamic;
1733
1794
  declare const getAnimationCurve: (curve?: string | ValueOf<typeof TRANSITION_CURVES>) => string;
1734
1795
  declare const animationTransition: (transition: ValueOf<typeof TRANSITIONS>, offset?: number) => {
1735
1796
  from: {};
@@ -1737,4 +1798,4 @@ declare const animationTransition: (transition: ValueOf<typeof TRANSITIONS>, off
1737
1798
  };
1738
1799
  declare const getAnimationTransition: (transition: ValueOf<typeof TRANSITIONS>, to?: boolean, from?: boolean) => dynamic;
1739
1800
 
1740
- export { ALERT, AVATAR, Accordion, type AccordionHandler, type AccordionProps, ActionBar, type ActionBarHandler, type ActionBarItem, type ActionBarProps, Alert, type AlertHandler, type AlertProps, AutoComplete, type AutoCompleteProps, Avatar, type AvatarHandler, type AvatarProps, Badge, type BadgeProps, Box, type BoxProps, Bubble, BubbleMediaType, type BubbleProps, BubbleStatus, Button, type ButtonHandler, type ButtonProps, ButtonState, CHART, CHECKBOX, COLORTHEME, Calendar, type CalendarProps, Chart, type ChartProps, CheckBox, type CheckBoxProps, type CheckboxHandler, CodeBlock, type CodeBlockProps, ColorScheme$1 as ColorScheme, type Column, type ContextItem, ContextMenu, type ContextMenuHandler, type ContextMenuProps, type CookieConsentProps, CookiesConsent, Cover, type CoverProps, type CropHandler, CropShape, Cropper, type CropperProps, Crumb, type CrumbItem, type CrumbProps, DATATYPE, DIALOG, DIALOG_ACTION_POSITION, DRAWER_SIDE, DatePicker, Dialog, type DialogActionHandler, type DialogContextType, type DialogController, type DialogHandler, type DialogProps, SheetProvider as DialogProvider, Drawer, type DrawerHandler, type DrawerProps, FILTER, FORMVALIDATION, FORMVALIDATION_STYLE, Fab, type FabProps, type FilterProps, Filters, Form, type FormHandler, type FormInputs, type FormProps, Group, type GroupProps, Icon, type IconProps, Image, type ImageProps, Input, type InputProps, type KeyCombination, type KeyboardKey, type KeyboardKeyProps, KeyBoardKeys as KeyboardKeys, KeysLabelMap, KeysMap, Label, type LabelProps, List, type ListItem, type ListItemObject, type ListProps, type MenuItemProps, type NetworkManagerprops, NetworkManager as NetworkStatus, type Option, type OptionItemProps, Overlay, type OverlayProps, PACKAGE_NAME, POSITION, PROGRESS, Pagination, type PaginationCallback, type PaginationPage, type PaginationPageItem, type PaginationProps, PaginationStyle, Password, type PasswordProps, PinInput, type PinInputProps, Position, ProgressBar, type ProgressBarProps, type ProgressHandler, type Props, RADIO, Radio, type RadioHandler, type RadioProps, type Row, type RowSelectCallback, SHEET, SHEET_ACTION_POSITION, SKELETON, SLIDER, SORT, SPINNER, ScrollView, type ScrollViewProps, Search, type SearchHandler, type SearchProps, type Segment, type SegmentController, type SegmentItemProps, type SegmentProps, Select, type SelectHandler, type SelectProps, Segmented as SelectTabs, Sheet, type SheetHandler, type SheetProps, type Skeleton, Slider, type SliderProps, Span, type SpanProps, Spinner, type SpinnerProps, Status, Switch, TRANSITIONS, TRANSITION_CURVES, type Tab, type TabBodyProps, type TabProps, TabView, type TabViewHandler, type TabViewProps, ForwardedTable as Table, type TableController, type TableProps, type TableSortCallback, Text, type TextAreaProps, TextWheel, type TextWheelHandler, type TextWheelProps, TextArea as Textarea, ThemeProvider, type ToastContextType, type ToastController, type ToastData, ToastDefaultTitle, ToastProvider, ToastType, ToolTip, type ToolTipProps, type TreeItemHandler, type TreeItemProps, type TreeNode, type TreeNodeIcons, TreeView, type TreeViewHandler, type TreeViewProps, type Value, type ValueOf, Variant, type ZuzCommonValues, type ZuzProps, type ZuzStyleString, _buildWithStyles, type animationProps, animationTransition, buildClassString, buildWithStyles, cleanProps, css, type cssShortKey, type cssShortKeys, type dynamic, getAnimationCurve, getAnimationTransition, getZuzMap, isKeyCombination, type parallaxEffectProps, setZuzMap, splitAtoms, useBase, useContextMenu, useDialog, useFx, usePosition, useToast };
1801
+ export { ALERT, AVATAR, Accordion, type AccordionHandler, type AccordionProps, ActionBar, type ActionBarHandler, type ActionBarItem, type ActionBarProps, Alert, type AlertHandler, type AlertProps, AutoComplete, type AutoCompleteProps, Avatar, type AvatarHandler, type AvatarProps, Badge, type BadgeProps, Box, type BoxProps, Bubble, BubbleMediaType, type BubbleProps, BubbleStatus, Button, type ButtonHandler, type ButtonProps, ButtonState, CHART, CHECKBOX, COLORTHEME, Calendar, type CalendarProps, Chart, type ChartProps, CheckBox, type CheckBoxProps, type CheckboxHandler, CodeBlock, type CodeBlockProps, ColorScheme$1 as ColorScheme, type Column, type ContextItem, ContextMenu, type ContextMenuHandler, type ContextMenuProps, type CookieConsentProps, CookiesConsent, Cover, type CoverProps, type CropHandler, CropShape, Cropper, type CropperProps, Crumb, type CrumbItem, type CrumbProps, DATATYPE, DIALOG, DIALOG_ACTION_POSITION, DRAWER_SIDE, DatePicker, Dialog, type DialogActionHandler, type DialogHandler, type DialogProps, Drawer, type DrawerHandler, type DrawerProps, FILTER, FORMVALIDATION, FORMVALIDATION_STYLE, Fab, type FabProps, type FilterProps, Filters, Form, type FormHandler, type FormInputs, type FormProps, Group, type GroupProps, Icon, type IconProps, Image, type ImageProps, Input, type InputProps, type KeyCombination, type KeyboardKey, type KeyboardKeyProps, KeyBoardKeys as KeyboardKeys, KeysLabelMap, KeysMap, Label, type LabelProps, List, type ListItem, type ListItemObject, type ListProps, type MenuItemProps, type MorphOptions, type NetworkManagerprops, NetworkManager as NetworkStatus, ORIGIN, type Option, type OptionItemProps, OriginType, Overlay, type OverlayProps, PACKAGE_NAME, POSITION, PROGRESS, Pagination, type PaginationCallback, type PaginationPage, type PaginationPageItem, type PaginationProps, PaginationStyle, Password, type PasswordProps, PinInput, type PinInputProps, Position, ProgressBar, type ProgressBarProps, type ProgressHandler, type Props, RADIO, Radio, type RadioHandler, type RadioProps, type Row, type RowSelectCallback, SHEET, SHEET_ACTION_POSITION, SKELETON, SLIDER, SORT, SPINNER, ScrollView, type ScrollViewProps, Search, type SearchHandler, type SearchProps, type Segment, type SegmentController, type SegmentItemProps, type SegmentProps, Select, type SelectHandler, type SelectProps, Segmented as SelectTabs, Sheet, type SheetHandler, type SheetProps, type Skeleton, Slider, type SliderProps, Span, type SpanProps, Spinner, type SpinnerProps, Status, Switch, TRANSITIONS, TRANSITION_CURVES, type Tab, type TabBodyProps, type TabProps, TabView, type TabViewHandler, type TabViewProps, ForwardedTable as Table, type TableController, type TableOfContentItem, TableOfContents, type TableOfContentsProps, type TableProps, type TableSortCallback, Terminal, type TerminalCommandFn, type TerminalCommands, type TerminalHandler, type TerminalLine, type TerminalProps, Text, type TextAreaProps, TextWheel, type TextWheelHandler, type TextWheelProps, TextArea as Textarea, ThemeProvider, ToastDefaultTitle, type ToastProps, Toast as ToastProvider, ToastType, ToolTip, type ToolTipProps, type TreeItemHandler, type TreeItemProps, type TreeNode, type TreeNodeIcons, TreeView, type TreeViewHandler, type TreeViewProps, type Value, type ValueOf, Variant, type ZuzCommonValues, type ZuzProps, type ZuzStyleString, type animationProps, animationTransition, buildClassString, buildWithStyles, cleanProps, css, type cssShortKey, type cssShortKeys, type dynamic, getAnimationCurve, getAnimationTransition, getZuzMap, isKeyCombination, type parallaxEffectProps, setZuzMap, splitAtoms, useBase, useContextMenu, useDialog, useDrawer, useFx, useMorph, usePosition, useToast };