asterui 0.12.12 → 0.12.14

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.
Files changed (179) hide show
  1. package/dist/components/Button.d.ts +4 -0
  2. package/dist/components/Drawer.d.ts +47 -6
  3. package/dist/components/Dropdown.d.ts +65 -9
  4. package/dist/components/Input.d.ts +15 -1
  5. package/dist/components/Menu.d.ts +1 -1
  6. package/dist/components/Modal.d.ts +5 -1
  7. package/dist/components/Navbar.d.ts +15 -1
  8. package/dist/components/SidebarDrawer.d.ts +21 -0
  9. package/dist/components/Steps.d.ts +42 -6
  10. package/dist/components/Tabs.d.ts +30 -4
  11. package/dist/index.d.ts +7 -5
  12. package/dist/index.js +169 -167
  13. package/dist/index.js.map +1 -1
  14. package/dist/index100.js +44 -11
  15. package/dist/index100.js.map +1 -1
  16. package/dist/index101.js +10 -12
  17. package/dist/index101.js.map +1 -1
  18. package/dist/index102.js +14 -7
  19. package/dist/index102.js.map +1 -1
  20. package/dist/index103.js +7 -12
  21. package/dist/index103.js.map +1 -1
  22. package/dist/index104.js +11 -29
  23. package/dist/index104.js.map +1 -1
  24. package/dist/index105.js +29 -16
  25. package/dist/index105.js.map +1 -1
  26. package/dist/index106.js +21 -0
  27. package/dist/index106.js.map +1 -0
  28. package/dist/index21.js +1 -1
  29. package/dist/index26.js +171 -40
  30. package/dist/index26.js.map +1 -1
  31. package/dist/index27.js +41 -17
  32. package/dist/index27.js.map +1 -1
  33. package/dist/index28.js +17 -33
  34. package/dist/index28.js.map +1 -1
  35. package/dist/index29.js +33 -52
  36. package/dist/index29.js.map +1 -1
  37. package/dist/index30.js +50 -61
  38. package/dist/index30.js.map +1 -1
  39. package/dist/index31.js +60 -181
  40. package/dist/index31.js.map +1 -1
  41. package/dist/index32.js +184 -18
  42. package/dist/index32.js.map +1 -1
  43. package/dist/index33.js +15 -217
  44. package/dist/index33.js.map +1 -1
  45. package/dist/index34.js +216 -1083
  46. package/dist/index34.js.map +1 -1
  47. package/dist/index35.js +1086 -16
  48. package/dist/index35.js.map +1 -1
  49. package/dist/index36.js +16 -121
  50. package/dist/index36.js.map +1 -1
  51. package/dist/index37.js +119 -37
  52. package/dist/index37.js.map +1 -1
  53. package/dist/index38.js +34 -208
  54. package/dist/index38.js.map +1 -1
  55. package/dist/index39.js +390 -89
  56. package/dist/index39.js.map +1 -1
  57. package/dist/index40.js +93 -158
  58. package/dist/index40.js.map +1 -1
  59. package/dist/index41.js +211 -135
  60. package/dist/index41.js.map +1 -1
  61. package/dist/index42.js +146 -15
  62. package/dist/index42.js.map +1 -1
  63. package/dist/index43.js +15 -17
  64. package/dist/index43.js.map +1 -1
  65. package/dist/index44.js +17 -21
  66. package/dist/index44.js.map +1 -1
  67. package/dist/index45.js +18 -134
  68. package/dist/index45.js.map +1 -1
  69. package/dist/index46.js +134 -10
  70. package/dist/index46.js.map +1 -1
  71. package/dist/index47.js +13 -35
  72. package/dist/index47.js.map +1 -1
  73. package/dist/index48.js +35 -34
  74. package/dist/index48.js.map +1 -1
  75. package/dist/index49.js +34 -81
  76. package/dist/index49.js.map +1 -1
  77. package/dist/index50.js +71 -166
  78. package/dist/index50.js.map +1 -1
  79. package/dist/index51.js +167 -144
  80. package/dist/index51.js.map +1 -1
  81. package/dist/index52.js +152 -11
  82. package/dist/index52.js.map +1 -1
  83. package/dist/index53.js +10 -20
  84. package/dist/index53.js.map +1 -1
  85. package/dist/index54.js +22 -14
  86. package/dist/index54.js.map +1 -1
  87. package/dist/index55.js +14 -7
  88. package/dist/index55.js.map +1 -1
  89. package/dist/index56.js +6 -310
  90. package/dist/index56.js.map +1 -1
  91. package/dist/index57.js +334 -17
  92. package/dist/index57.js.map +1 -1
  93. package/dist/index58.js +47 -122
  94. package/dist/index58.js.map +1 -1
  95. package/dist/index59.js +120 -108
  96. package/dist/index59.js.map +1 -1
  97. package/dist/index60.js +107 -167
  98. package/dist/index60.js.map +1 -1
  99. package/dist/index61.js +167 -29
  100. package/dist/index61.js.map +1 -1
  101. package/dist/index62.js +30 -120
  102. package/dist/index62.js.map +1 -1
  103. package/dist/index63.js +116 -80
  104. package/dist/index63.js.map +1 -1
  105. package/dist/index64.js +85 -19
  106. package/dist/index64.js.map +1 -1
  107. package/dist/index65.js +19 -73
  108. package/dist/index65.js.map +1 -1
  109. package/dist/index66.js +71 -54
  110. package/dist/index66.js.map +1 -1
  111. package/dist/index67.js +56 -44
  112. package/dist/index67.js.map +1 -1
  113. package/dist/index68.js +42 -49
  114. package/dist/index68.js.map +1 -1
  115. package/dist/index69.js +52 -62
  116. package/dist/index69.js.map +1 -1
  117. package/dist/index70.js +56 -101
  118. package/dist/index70.js.map +1 -1
  119. package/dist/index71.js +107 -41
  120. package/dist/index71.js.map +1 -1
  121. package/dist/index72.js +41 -68
  122. package/dist/index72.js.map +1 -1
  123. package/dist/index73.js +66 -19
  124. package/dist/index73.js.map +1 -1
  125. package/dist/index74.js +18 -55
  126. package/dist/index74.js.map +1 -1
  127. package/dist/index75.js +55 -251
  128. package/dist/index75.js.map +1 -1
  129. package/dist/index76.js +254 -22
  130. package/dist/index76.js.map +1 -1
  131. package/dist/index77.js +22 -31
  132. package/dist/index77.js.map +1 -1
  133. package/dist/index78.js +31 -22
  134. package/dist/index78.js.map +1 -1
  135. package/dist/index79.js +89 -324
  136. package/dist/index79.js.map +1 -1
  137. package/dist/index80.js +323 -50
  138. package/dist/index80.js.map +1 -1
  139. package/dist/index81.js +79 -39
  140. package/dist/index81.js.map +1 -1
  141. package/dist/index82.js +40 -23
  142. package/dist/index82.js.map +1 -1
  143. package/dist/index83.js +21 -93
  144. package/dist/index83.js.map +1 -1
  145. package/dist/index84.js +87 -148
  146. package/dist/index84.js.map +1 -1
  147. package/dist/index85.js +147 -152
  148. package/dist/index85.js.map +1 -1
  149. package/dist/index86.js +159 -63
  150. package/dist/index86.js.map +1 -1
  151. package/dist/index87.js +65 -35
  152. package/dist/index87.js.map +1 -1
  153. package/dist/index88.js +35 -234
  154. package/dist/index88.js.map +1 -1
  155. package/dist/index89.js +231 -31
  156. package/dist/index89.js.map +1 -1
  157. package/dist/index9.js +69 -44
  158. package/dist/index9.js.map +1 -1
  159. package/dist/index90.js +34 -210
  160. package/dist/index90.js.map +1 -1
  161. package/dist/index91.js +195 -198
  162. package/dist/index91.js.map +1 -1
  163. package/dist/index92.js +159 -241
  164. package/dist/index92.js.map +1 -1
  165. package/dist/index93.js +283 -166
  166. package/dist/index93.js.map +1 -1
  167. package/dist/index94.js +173 -253
  168. package/dist/index94.js.map +1 -1
  169. package/dist/index95.js +258 -14
  170. package/dist/index95.js.map +1 -1
  171. package/dist/index96.js +12 -31
  172. package/dist/index96.js.map +1 -1
  173. package/dist/index97.js +32 -5
  174. package/dist/index97.js.map +1 -1
  175. package/dist/index98.js +5 -13
  176. package/dist/index98.js.map +1 -1
  177. package/dist/index99.js +11 -43
  178. package/dist/index99.js.map +1 -1
  179. package/package.json +1 -1
@@ -15,6 +15,8 @@ type BaseButtonProps = {
15
15
  iconPosition?: 'start' | 'end';
16
16
  /** Applies error/danger styling (shorthand for type="error") */
17
17
  danger?: boolean;
18
+ /** Toggle button pressed state (sets aria-pressed) */
19
+ pressed?: boolean;
18
20
  };
19
21
  type ButtonAsButton = BaseButtonProps & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'type'> & {
20
22
  href?: undefined;
@@ -23,6 +25,8 @@ type ButtonAsButton = BaseButtonProps & Omit<React.ButtonHTMLAttributes<HTMLButt
23
25
  type ButtonAsAnchor = BaseButtonProps & Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'type'> & {
24
26
  href: string;
25
27
  htmlType?: undefined;
28
+ /** Disable the link button */
29
+ disabled?: boolean;
26
30
  };
27
31
  export type ButtonProps = ButtonAsButton | ButtonAsAnchor;
28
32
  export declare const Button: React.FC<ButtonProps>;
@@ -1,10 +1,51 @@
1
1
  import { default as React } from 'react';
2
- export interface DrawerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {
2
+ export type DrawerPlacement = 'top' | 'right' | 'bottom' | 'left';
3
+ export type DrawerSize = 'default' | 'large' | number;
4
+ export interface DrawerProps {
5
+ /** Drawer content */
3
6
  children: React.ReactNode;
4
- sidebar: React.ReactNode;
7
+ /** Whether the drawer is visible */
5
8
  open?: boolean;
6
- onOpenChange?: (open: boolean) => void;
7
- end?: boolean;
8
- sidebarClassName?: string;
9
+ /** Callback when drawer is closed */
10
+ onClose?: () => void;
11
+ /** Drawer title */
12
+ title?: React.ReactNode;
13
+ /** Direction drawer slides from */
14
+ placement?: DrawerPlacement;
15
+ /** Preset size or custom width/height in pixels */
16
+ size?: DrawerSize;
17
+ /** Custom width (overrides size for left/right placement) */
18
+ width?: number | string;
19
+ /** Custom height (overrides size for top/bottom placement) */
20
+ height?: number | string;
21
+ /** Whether to show close button */
22
+ closable?: boolean;
23
+ /** Whether to show mask/backdrop */
24
+ mask?: boolean;
25
+ /** Whether clicking mask closes drawer */
26
+ maskClosable?: boolean;
27
+ /** Whether ESC closes drawer */
28
+ keyboard?: boolean;
29
+ /** Footer content */
30
+ footer?: React.ReactNode;
31
+ /** Extra content in header (right side) */
32
+ extra?: React.ReactNode;
33
+ /** CSS class for drawer panel */
34
+ className?: string;
35
+ /** CSS class for drawer wrapper */
36
+ rootClassName?: string;
37
+ /** Style for drawer panel */
38
+ style?: React.CSSProperties;
39
+ /** z-index of drawer */
40
+ zIndex?: number;
41
+ /** Destroy content when closed */
42
+ destroyOnClose?: boolean;
43
+ /** Where to place initial focus */
44
+ initialFocus?: 'close' | 'content';
9
45
  }
10
- export declare const Drawer: React.FC<DrawerProps>;
46
+ /**
47
+ * Drawer - A panel that slides in from the edge of the screen.
48
+ * Use for forms, details, or task panels.
49
+ * For responsive sidebar navigation, use SidebarDrawer instead.
50
+ */
51
+ export declare function Drawer({ children, open, onClose, title, placement, size, width, height, closable, mask, maskClosable, keyboard, footer, extra, className, rootClassName, style, zIndex, destroyOnClose, initialFocus, }: DrawerProps): React.ReactPortal | null;
@@ -1,28 +1,67 @@
1
1
  import { default as React } from 'react';
2
- export interface DropdownProps extends React.HTMLAttributes<HTMLDivElement> {
3
- children: React.ReactNode;
2
+ export type DropdownTriggerType = 'click' | 'hover' | 'contextMenu';
3
+ export interface DropdownMenuItem {
4
+ key: string;
5
+ label: React.ReactNode;
6
+ icon?: React.ReactNode;
7
+ disabled?: boolean;
8
+ danger?: boolean;
9
+ onClick?: () => void;
10
+ children?: DropdownMenuItem[];
11
+ }
12
+ export interface DropdownMenuDivider {
13
+ type: 'divider';
14
+ key?: string;
15
+ }
16
+ export type DropdownMenuItemType = DropdownMenuItem | DropdownMenuDivider;
17
+ export interface DropdownProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {
18
+ /** Trigger element and dropdown content (compound pattern) */
19
+ children?: React.ReactNode;
20
+ /** Menu items (data-driven pattern) */
21
+ items?: DropdownMenuItemType[];
22
+ /** @deprecated Use trigger={['hover']} instead */
4
23
  hover?: boolean;
24
+ /** Trigger mode(s) for dropdown */
25
+ trigger?: DropdownTriggerType[];
5
26
  position?: 'top' | 'bottom' | 'left' | 'right';
6
27
  align?: 'start' | 'center' | 'end';
7
28
  /** Controlled open state */
8
29
  open?: boolean;
9
30
  /** Callback when open state changes */
10
- onOpenChange?: (open: boolean) => void;
31
+ onOpenChange?: (open: boolean, info?: {
32
+ source: 'trigger' | 'menu';
33
+ }) => void;
11
34
  /** Disable the dropdown */
12
35
  disabled?: boolean;
13
36
  /** Show arrow pointing to trigger */
14
- arrow?: boolean;
37
+ arrow?: boolean | {
38
+ pointAtCenter?: boolean;
39
+ };
40
+ /** Delay before showing dropdown on hover (seconds) */
41
+ mouseEnterDelay?: number;
42
+ /** Delay before hiding dropdown on mouse leave (seconds) */
43
+ mouseLeaveDelay?: number;
44
+ /** Container for the dropdown menu */
45
+ getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement;
46
+ /** Destroy dropdown when hidden */
47
+ destroyOnHidden?: boolean;
15
48
  }
16
49
  export interface DropdownTriggerProps {
17
50
  children: React.ReactNode;
18
51
  className?: string;
19
52
  }
20
53
  export interface DropdownMenuProps {
21
- children: React.ReactNode;
54
+ children?: React.ReactNode;
22
55
  className?: string;
23
56
  }
24
57
  export interface DropdownItemProps {
25
- children: React.ReactNode;
58
+ children?: React.ReactNode;
59
+ /** Unique key for the item */
60
+ itemKey?: string;
61
+ /** Icon to display before label */
62
+ icon?: React.ReactNode;
63
+ /** Item label (alternative to children) */
64
+ label?: React.ReactNode;
26
65
  onClick?: () => void;
27
66
  active?: boolean;
28
67
  disabled?: boolean;
@@ -30,18 +69,35 @@ export interface DropdownItemProps {
30
69
  className?: string;
31
70
  _index?: number;
32
71
  }
72
+ export interface DropdownSubMenuProps {
73
+ children: React.ReactNode;
74
+ /** Unique key for the submenu */
75
+ itemKey?: string;
76
+ /** Submenu title/label */
77
+ title: React.ReactNode;
78
+ /** Icon to display before title */
79
+ icon?: React.ReactNode;
80
+ disabled?: boolean;
81
+ className?: string;
82
+ }
33
83
  export interface DropdownDividerProps {
34
84
  className?: string;
35
85
  }
36
- declare function DropdownRoot({ children, hover, position, align, open: controlledOpen, onOpenChange, disabled, arrow, className, ...rest }: DropdownProps): import("react/jsx-runtime").JSX.Element;
37
- declare function DropdownTrigger({ children, className }: DropdownTriggerProps): import("react/jsx-runtime").JSX.Element;
86
+ declare function DropdownRoot({ children, items, hover, trigger, position, align, open: controlledOpen, onOpenChange, disabled, arrow, mouseEnterDelay, mouseLeaveDelay, getPopupContainer, destroyOnHidden, className, ...rest }: DropdownProps): import("react/jsx-runtime").JSX.Element;
87
+ declare function DropdownTrigger({ children, className }: DropdownTriggerProps): React.ReactElement<React.HTMLAttributes<HTMLElement> & {
88
+ onClick?: (e: React.MouseEvent) => void;
89
+ onKeyDown?: (e: React.KeyboardEvent) => void;
90
+ className?: string;
91
+ }, string | React.JSXElementConstructor<any>>;
38
92
  declare function DropdownMenu({ children, className }: DropdownMenuProps): import("react/jsx-runtime").JSX.Element;
39
- declare function DropdownItem({ children, onClick, active, disabled, danger, className, }: DropdownItemProps): import("react/jsx-runtime").JSX.Element;
93
+ declare function DropdownItem({ children, itemKey, icon, label, onClick, active, disabled, danger, className, }: DropdownItemProps): import("react/jsx-runtime").JSX.Element;
94
+ declare function DropdownSubMenu({ children, itemKey, title, icon, disabled, className, }: DropdownSubMenuProps): import("react/jsx-runtime").JSX.Element;
40
95
  declare function DropdownDivider({ className }: DropdownDividerProps): import("react/jsx-runtime").JSX.Element;
41
96
  export declare const Dropdown: typeof DropdownRoot & {
42
97
  Trigger: typeof DropdownTrigger;
43
98
  Menu: typeof DropdownMenu;
44
99
  Item: typeof DropdownItem;
100
+ SubMenu: typeof DropdownSubMenu;
45
101
  Divider: typeof DropdownDivider;
46
102
  };
47
103
  export {};
@@ -1,8 +1,10 @@
1
1
  import { default as React } from 'react';
2
- export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {
2
+ export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'prefix'> {
3
3
  type?: 'text' | 'password' | 'email' | 'number' | 'date' | 'datetime-local' | 'week' | 'month' | 'tel' | 'url' | 'search' | 'time';
4
4
  size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
5
5
  color?: 'neutral' | 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error';
6
+ /** Validation status */
7
+ status?: 'error' | 'warning';
6
8
  ghost?: boolean;
7
9
  bordered?: boolean;
8
10
  className?: string;
@@ -10,5 +12,17 @@ export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElem
10
12
  mask?: string;
11
13
  /** Placeholder character shown in mask (default: _) */
12
14
  maskPlaceholder?: string;
15
+ /** Show clear button when input has value */
16
+ allowClear?: boolean | {
17
+ clearIcon?: React.ReactNode;
18
+ };
19
+ /** Callback when clear button is clicked */
20
+ onClear?: () => void;
21
+ /** Prefix icon or element */
22
+ prefix?: React.ReactNode;
23
+ /** Suffix icon or element */
24
+ suffix?: React.ReactNode;
25
+ /** ID for error message element (for aria-describedby) */
26
+ errorId?: string;
13
27
  }
14
28
  export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
@@ -41,7 +41,7 @@ export interface MenuItemProps extends Omit<React.HTMLAttributes<HTMLAnchorEleme
41
41
  /** @deprecated Use itemKey and selectedKeys instead */
42
42
  active?: boolean;
43
43
  }
44
- export interface MenuSubMenuProps extends React.HTMLAttributes<HTMLLIElement> {
44
+ export interface MenuSubMenuProps extends Omit<React.HTMLAttributes<HTMLLIElement>, 'title'> {
45
45
  children: React.ReactNode;
46
46
  itemKey: string;
47
47
  /** Submenu label */
@@ -23,6 +23,10 @@ export interface ModalProps extends Omit<React.HTMLAttributes<HTMLDialogElement>
23
23
  centered?: boolean;
24
24
  /** Callback when modal is closed */
25
25
  onClose?: () => void;
26
+ /** Where to place initial focus: 'ok', 'cancel', or 'close' button */
27
+ initialFocus?: 'ok' | 'cancel' | 'close';
28
+ /** Use alertdialog role for urgent messages */
29
+ alertDialog?: boolean;
26
30
  }
27
31
  export interface ModalFuncProps {
28
32
  title?: React.ReactNode;
@@ -33,7 +37,7 @@ export interface ModalFuncProps {
33
37
  cancelText?: string;
34
38
  type?: 'info' | 'success' | 'warning' | 'error';
35
39
  }
36
- export declare function Modal({ children, title, footer, open, onOk, onCancel, okText, cancelText, maskClosable, closable, position, align, width, centered, onClose, className, ...rest }: ModalProps): import("react/jsx-runtime").JSX.Element;
40
+ export declare function Modal({ children, title, footer, open, onOk, onCancel, okText, cancelText, maskClosable, closable, position, align, width, centered, onClose, initialFocus, alertDialog, className, ...rest }: ModalProps): import("react/jsx-runtime").JSX.Element;
37
41
  export declare namespace Modal {
38
42
  var confirm: (config: ModalFuncProps) => {
39
43
  destroy: () => void;
@@ -1,8 +1,22 @@
1
1
  import { default as React } from 'react';
2
- export interface NavbarProps extends React.HTMLAttributes<HTMLDivElement> {
2
+ export type NavbarColor = 'base' | 'neutral' | 'primary' | 'secondary' | 'accent';
3
+ export type NavbarShadow = 'none' | 'sm' | 'md' | 'lg' | 'xl';
4
+ export type NavbarRounded = 'none' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
5
+ export interface NavbarProps extends Omit<React.HTMLAttributes<HTMLElement>, 'color'> {
3
6
  children?: React.ReactNode;
7
+ /** Content for the start section of the navbar (typically logo/brand) */
4
8
  start?: React.ReactNode;
9
+ /** Content for the center section of the navbar */
5
10
  center?: React.ReactNode;
11
+ /** Content for the end section of the navbar (typically actions/menu) */
6
12
  end?: React.ReactNode;
13
+ /** Background color variant */
14
+ color?: NavbarColor;
15
+ /** Make navbar sticky at the top */
16
+ sticky?: boolean;
17
+ /** Shadow depth */
18
+ shadow?: NavbarShadow;
19
+ /** Border radius */
20
+ rounded?: NavbarRounded;
7
21
  }
8
22
  export declare const Navbar: React.FC<NavbarProps>;
@@ -0,0 +1,21 @@
1
+ import { default as React } from 'react';
2
+ export interface SidebarDrawerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {
3
+ /** Main content area */
4
+ children: React.ReactNode;
5
+ /** Sidebar content */
6
+ sidebar: React.ReactNode;
7
+ /** Controlled open state */
8
+ open?: boolean;
9
+ /** Callback when open state changes */
10
+ onOpenChange?: (open: boolean) => void;
11
+ /** Position sidebar on the right side */
12
+ end?: boolean;
13
+ /** Additional classes for sidebar container */
14
+ sidebarClassName?: string;
15
+ }
16
+ /**
17
+ * SidebarDrawer - A responsive sidebar layout component using DaisyUI's drawer.
18
+ * Use for navigation sidebars that toggle on mobile.
19
+ * For overlay panel drawers (forms, details), use the Drawer component instead.
20
+ */
21
+ export declare const SidebarDrawer: React.FC<SidebarDrawerProps>;
@@ -1,15 +1,51 @@
1
1
  import { default as React } from 'react';
2
- export interface StepsProps extends React.HTMLAttributes<HTMLUListElement> {
3
- children: React.ReactNode;
2
+ export type StepsDirection = 'horizontal' | 'vertical';
3
+ export interface StepItem {
4
+ key?: string;
5
+ title: React.ReactNode;
6
+ description?: React.ReactNode;
7
+ icon?: React.ReactNode;
8
+ color?: 'neutral' | 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error';
9
+ disabled?: boolean;
10
+ }
11
+ export interface StepsProps extends Omit<React.HTMLAttributes<HTMLUListElement>, 'onChange'> {
12
+ /** Step items (compound pattern) */
13
+ children?: React.ReactNode;
14
+ /** Step items (data-driven pattern) */
15
+ items?: StepItem[];
16
+ /** Current step index (0-based) */
17
+ current?: number;
18
+ /** Layout direction */
19
+ direction?: StepsDirection;
20
+ /** @deprecated Use direction="vertical" instead */
4
21
  vertical?: boolean;
22
+ /** Callback when step is clicked */
23
+ onChange?: (current: number) => void;
5
24
  }
6
- export interface StepProps extends Omit<React.LiHTMLAttributes<HTMLLIElement>, 'color'> {
7
- children: React.ReactNode;
25
+ export interface StepProps extends Omit<React.LiHTMLAttributes<HTMLLIElement>, 'color' | 'title'> {
26
+ /** Step title/label */
27
+ children?: React.ReactNode;
28
+ /** Step title (alternative to children) */
29
+ title?: React.ReactNode;
30
+ /** Step description */
31
+ description?: React.ReactNode;
32
+ /** Step icon */
33
+ icon?: React.ReactNode;
34
+ /** Step color */
8
35
  color?: 'neutral' | 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error';
36
+ /** Custom content for step indicator */
9
37
  dataContent?: string;
38
+ /** Whether step is disabled */
39
+ disabled?: boolean;
40
+ /** Internal: step index */
41
+ _index?: number;
42
+ /** Internal: whether step is clickable */
43
+ _clickable?: boolean;
44
+ /** Internal: click handler */
45
+ _onClick?: (index: number) => void;
10
46
  }
11
- declare function StepsRoot({ children, vertical, className, ...rest }: StepsProps): import("react/jsx-runtime").JSX.Element;
12
- declare function Step({ children, color, dataContent, className, ...rest }: StepProps): import("react/jsx-runtime").JSX.Element;
47
+ declare function StepsRoot({ children, items, current, direction, vertical, onChange, className, ...rest }: StepsProps): import("react/jsx-runtime").JSX.Element;
48
+ declare function Step({ children, title, description, icon, color, dataContent, disabled, className, _index, _clickable, _onClick, ...rest }: StepProps): import("react/jsx-runtime").JSX.Element;
13
49
  export declare const Steps: typeof StepsRoot & {
14
50
  Step: typeof Step;
15
51
  };
@@ -1,19 +1,45 @@
1
1
  import { default as React } from 'react';
2
+ export type TabsVariant = 'box' | 'border' | 'lift';
3
+ export type TabsSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
4
+ export type TabsPosition = 'top' | 'bottom';
5
+ export interface TabItem {
6
+ key: string;
7
+ label: React.ReactNode;
8
+ children?: React.ReactNode;
9
+ disabled?: boolean;
10
+ icon?: React.ReactNode;
11
+ }
2
12
  export interface TabsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {
3
- children: React.ReactNode;
13
+ /** Tab panels (compound pattern) */
14
+ children?: React.ReactNode;
15
+ /** Tab items (data-driven pattern) */
16
+ items?: TabItem[];
17
+ /** Current active tab key (controlled) */
4
18
  activeKey?: string;
19
+ /** Default active tab key (uncontrolled) */
5
20
  defaultActiveKey?: string;
21
+ /** Callback when tab changes */
6
22
  onChange?: (key: string) => void;
7
- variant?: 'box' | 'border' | 'lift';
8
- size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
23
+ /** Visual style variant */
24
+ variant?: TabsVariant;
25
+ /** Tab size */
26
+ size?: TabsSize;
27
+ /** Tab position relative to content */
28
+ position?: TabsPosition;
9
29
  }
10
30
  export interface TabPanelProps {
31
+ /** Tab button label */
11
32
  tab: React.ReactNode;
33
+ /** Unique identifier for the tab */
12
34
  tabKey: string;
35
+ /** Disable the tab */
13
36
  disabled?: boolean;
37
+ /** Tab panel content */
14
38
  children?: React.ReactNode;
39
+ /** Tab icon */
40
+ icon?: React.ReactNode;
15
41
  }
16
- declare function TabsRoot({ children, activeKey, defaultActiveKey, onChange, variant, size, className, ...rest }: TabsProps): import("react/jsx-runtime").JSX.Element;
42
+ declare function TabsRoot({ children, items, activeKey, defaultActiveKey, onChange, variant, size, position, className, ...rest }: TabsProps): import("react/jsx-runtime").JSX.Element;
17
43
  declare function TabPanel({ children }: TabPanelProps): import("react/jsx-runtime").JSX.Element;
18
44
  export declare const Tabs: typeof TabsRoot & {
19
45
  Panel: typeof TabPanel;
package/dist/index.d.ts CHANGED
@@ -47,7 +47,9 @@ export type { DockProps, DockItemProps, DockItemConfig } from './components/Dock
47
47
  export { Divider } from './components/Divider';
48
48
  export type { DividerProps } from './components/Divider';
49
49
  export { Drawer } from './components/Drawer';
50
- export type { DrawerProps } from './components/Drawer';
50
+ export type { DrawerProps, DrawerPlacement, DrawerSize } from './components/Drawer';
51
+ export { SidebarDrawer } from './components/SidebarDrawer';
52
+ export type { SidebarDrawerProps } from './components/SidebarDrawer';
51
53
  export { Fieldset } from './components/Fieldset';
52
54
  export type { FieldsetProps, FieldsetLegendProps } from './components/Fieldset';
53
55
  export { FileInput } from './components/FileInput';
@@ -71,7 +73,7 @@ export type { ImageProps } from './components/Image';
71
73
  export { Indicator } from './components/Indicator';
72
74
  export type { IndicatorProps, IndicatorPosition } from './components/Indicator';
73
75
  export { Dropdown } from './components/Dropdown';
74
- export type { DropdownProps, DropdownTriggerProps, DropdownMenuProps, DropdownItemProps, DropdownDividerProps } from './components/Dropdown';
76
+ export type { DropdownProps, DropdownTriggerProps, DropdownMenuProps, DropdownItemProps, DropdownSubMenuProps, DropdownDividerProps, DropdownMenuItem, DropdownMenuDivider, DropdownMenuItemType, DropdownTriggerType, } from './components/Dropdown';
75
77
  export { Empty } from './components/Empty';
76
78
  export type { EmptyProps } from './components/Empty';
77
79
  export { Input } from './components/Input';
@@ -109,7 +111,7 @@ export type { WindowProps } from './components/Window';
109
111
  export { Modal } from './components/Modal';
110
112
  export type { ModalProps, ModalFuncProps, ModalPosition, ModalAlign, ResponsivePosition } from './components/Modal';
111
113
  export { Navbar } from './components/Navbar';
112
- export type { NavbarProps } from './components/Navbar';
114
+ export type { NavbarProps, NavbarColor, NavbarShadow, NavbarRounded } from './components/Navbar';
113
115
  export { notification } from './components/Notification';
114
116
  export type { NotificationConfig, NotificationType, NotificationPlacement } from './components/Notification';
115
117
  export { OTPInput } from './components/OTPInput';
@@ -151,11 +153,11 @@ export type { StatsProps, StatProps } from './components/Stat';
151
153
  export { Status } from './components/Status';
152
154
  export type { StatusProps, StatusType, StatusSize } from './components/Status';
153
155
  export { Steps } from './components/Steps';
154
- export type { StepsProps, StepProps } from './components/Steps';
156
+ export type { StepsProps, StepProps, StepItem, StepsDirection } from './components/Steps';
155
157
  export { Table } from './components/Table';
156
158
  export type { TableProps, ColumnType, PaginationConfig, FilterConfig, RowSelection } from './components/Table';
157
159
  export { Tabs } from './components/Tabs';
158
- export type { TabsProps, TabPanelProps } from './components/Tabs';
160
+ export type { TabsProps, TabPanelProps, TabItem, TabsVariant, TabsSize, TabsPosition } from './components/Tabs';
159
161
  export { Textarea } from './components/Textarea';
160
162
  export type { TextareaProps } from './components/Textarea';
161
163
  export { TextRotate } from './components/TextRotate';