flikkui 0.1.0-beta.2 → 0.1.0-beta.3

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 (104) hide show
  1. package/dist/components/charts/index.d.ts +2 -0
  2. package/dist/components/charts/shared/ChartLegend/ChartLegend.d.ts +7 -0
  3. package/dist/components/charts/shared/ChartLegend/ChartLegendContent.d.ts +7 -0
  4. package/dist/components/charts/shared/ChartLegend/index.d.ts +2 -0
  5. package/dist/components/core/AvatarGroup/AvatarGroup.animations.d.ts +1 -1
  6. package/dist/components/core/AvatarGroup/AvatarGroup.theme.d.ts +1 -0
  7. package/dist/components/core/Breadcrumbs/Breadcrumbs.js +8 -7
  8. package/dist/components/core/Button/Button.animations.d.ts +0 -12
  9. package/dist/components/core/Button/Button.animations.js +4 -19
  10. package/dist/components/core/Button/Button.js +40 -37
  11. package/dist/components/core/Button/Button.theme.d.ts +0 -4
  12. package/dist/components/core/Button/Button.theme.js +14 -9
  13. package/dist/components/core/Button/Button.types.d.ts +1 -1
  14. package/dist/components/core/Divider/Divider.types.d.ts +8 -2
  15. package/dist/components/core/Drawer/Drawer.types.d.ts +1 -1
  16. package/dist/components/core/Modal/Modal.types.d.ts +1 -1
  17. package/dist/components/core/Pagination/Pagination.types.d.ts +25 -13
  18. package/dist/components/core/Popover/Popover.animations.d.ts +34 -3
  19. package/dist/components/core/Popover/Popover.animations.js +19 -0
  20. package/dist/components/core/Popover/Popover.theme.js +2 -2
  21. package/dist/components/core/Popover/PopoverContent.js +5 -14
  22. package/dist/components/core/Segmented/Segmented.types.d.ts +17 -0
  23. package/dist/components/core/Tabs/Tabs.js +2 -8
  24. package/dist/components/core/Tabs/Tabs.theme.d.ts +8 -45
  25. package/dist/components/core/Tabs/Tabs.theme.js +14 -64
  26. package/dist/components/core/Tabs/Tabs.types.d.ts +4 -36
  27. package/dist/components/core/Tabs/TabsContent.js +3 -8
  28. package/dist/components/core/Tabs/TabsList.js +3 -10
  29. package/dist/components/core/Tabs/TabsTrigger.js +3 -15
  30. package/dist/components/core/Tabs/index.d.ts +1 -1
  31. package/dist/components/core/Tooltip/Tooltip.animations.d.ts +1 -1
  32. package/dist/components/core/Tooltip/Tooltip.d.ts +1 -1
  33. package/dist/components/core/Tooltip/Tooltip.theme.d.ts +0 -1
  34. package/dist/components/core/Tooltip/Tooltip.types.d.ts +15 -15
  35. package/dist/components/core/Tooltip/useTooltipPositioning.d.ts +12 -0
  36. package/dist/components/core/Tree/Tree.types.d.ts +8 -45
  37. package/dist/components/core/Tree/index.d.ts +1 -3
  38. package/dist/components/data-display/Table/Table.animations.d.ts +21 -0
  39. package/dist/components/data-display/Table/Table.types.d.ts +56 -13
  40. package/dist/components/data-display/Table/components/TableActionsMenu.d.ts +1 -1
  41. package/dist/components/data-display/Table/components/TableColumnManager/TableColumnManager.theme.d.ts +16 -0
  42. package/dist/components/data-display/Table/components/TablePagination/TablePagination.d.ts +17 -0
  43. package/dist/components/data-display/Table/components/TablePagination/TablePagination.types.d.ts +21 -0
  44. package/dist/components/data-display/Table/components/TablePagination/index.d.ts +2 -0
  45. package/dist/components/data-display/Table/index.d.ts +6 -3
  46. package/dist/components/feedback/Alert/Alert.types.d.ts +4 -0
  47. package/dist/components/feedback/ChatMessage/ChatMessage.types.d.ts +20 -14
  48. package/dist/components/feedback/Empty/Empty.theme.d.ts +4 -14
  49. package/dist/components/feedback/Empty/Empty.types.d.ts +8 -20
  50. package/dist/components/feedback/Empty/index.d.ts +2 -2
  51. package/dist/components/feedback/Notification/Notification.theme.d.ts +16 -1
  52. package/dist/components/feedback/Notification/Notification.types.d.ts +18 -40
  53. package/dist/components/feedback/Notification/index.d.ts +2 -2
  54. package/dist/components/feedback/Toast/Toast.animations.d.ts +31 -0
  55. package/dist/components/feedback/Toast/Toast.types.d.ts +1 -1
  56. package/dist/components/feedback/index.d.ts +3 -3
  57. package/dist/components/forms/Checkbox/Checkbox.js +10 -16
  58. package/dist/components/forms/Checkbox/Checkbox.theme.js +8 -6
  59. package/dist/components/forms/Checkbox/Checkbox.types.d.ts +13 -30
  60. package/dist/components/forms/FormLabel/FormLabel.d.ts +1 -2
  61. package/dist/components/forms/FormLabel/FormLabel.js +7 -14
  62. package/dist/components/forms/FormLabel/FormLabel.theme.d.ts +3 -4
  63. package/dist/components/forms/FormLabel/FormLabel.theme.js +6 -6
  64. package/dist/components/forms/FormLabel/FormLabel.types.d.ts +10 -18
  65. package/dist/components/forms/FormLabel/index.d.ts +3 -3
  66. package/dist/components/forms/Input/Input.d.ts +0 -1
  67. package/dist/components/forms/Input/Input.js +51 -85
  68. package/dist/components/forms/Input/Input.theme.d.ts +4 -4
  69. package/dist/components/forms/Input/Input.theme.js +26 -26
  70. package/dist/components/forms/Input/Input.types.d.ts +41 -64
  71. package/dist/components/forms/Input/index.d.ts +1 -1
  72. package/dist/components/forms/InputAddress/InputAddress.theme.d.ts +2 -2
  73. package/dist/components/forms/InputAddress/InputAddress.types.d.ts +3 -3
  74. package/dist/components/forms/InputCreditCard/InputCreditCard.theme.d.ts +3 -3
  75. package/dist/components/forms/InputCreditCard/InputCreditCard.types.d.ts +4 -4
  76. package/dist/components/forms/Radio/Radio.js +12 -18
  77. package/dist/components/forms/Radio/Radio.theme.d.ts +2 -18
  78. package/dist/components/forms/Radio/Radio.theme.js +10 -19
  79. package/dist/components/forms/Radio/Radio.types.d.ts +16 -32
  80. package/dist/components/forms/Select/Select.js +1 -9
  81. package/dist/components/forms/Signature/Signature.js +5 -4
  82. package/dist/components/forms/Signature/Signature.theme.js +1 -3
  83. package/dist/components/forms/Signature/Signature.types.d.ts +0 -4
  84. package/dist/components/layout/DragDrop/DragDrop.js +62 -0
  85. package/dist/components/layout/DragDrop/DragDrop.theme.js +8 -0
  86. package/dist/components/layout/Sortable/Sortable.animations.js +81 -0
  87. package/dist/components/layout/Sortable/Sortable.js +165 -0
  88. package/dist/components/layout/Sortable/Sortable.theme.js +7 -0
  89. package/dist/components/navigation/index.d.ts +1 -1
  90. package/dist/index.d.ts +1 -0
  91. package/dist/index.js +3 -1
  92. package/dist/node_modules/@heroicons/react/24/outline/esm/Bars3Icon.js +28 -0
  93. package/dist/node_modules/@heroicons/react/24/outline/esm/LockClosedIcon.js +28 -0
  94. package/dist/styles.css +1 -1
  95. package/dist/utils/debounce.d.ts +9 -0
  96. package/dist/utils/index.d.ts +1 -0
  97. package/package.json +2 -1
  98. package/dist/components/core/Popover/test-popover.d.ts +0 -3
  99. package/dist/components/core/Tabs/test-tabs.d.ts +0 -3
  100. package/dist/components/core/Tree/TreeIcon.d.ts +0 -3
  101. package/dist/components/core/Tree/TreeNode.d.ts +0 -6
  102. package/dist/components/forms/Input/Input.AdvancedStories.d.ts +0 -13
  103. package/dist/node_modules/framer-motion/dist/es/animation/hooks/animation-controls.js +0 -80
  104. package/dist/node_modules/framer-motion/dist/es/animation/hooks/use-animation.js +0 -41
@@ -1,44 +1,79 @@
1
1
  import { ReactNode } from 'react';
2
+ /**
3
+ * Defines bulk actions available when rows are selected
4
+ */
2
5
  export interface BulkAction {
6
+ /** Unique identifier for the action */
3
7
  id: string;
8
+ /** Display label for the action button */
4
9
  label: string;
10
+ /** Optional icon component to display in the action button */
5
11
  icon?: React.ComponentType<{
6
12
  className?: string;
7
13
  }>;
14
+ /** Visual style variant for the action button */
8
15
  variant?: 'primary' | 'secondary' | 'danger';
16
+ /** Callback function when action is triggered with selected row IDs */
9
17
  onClick: (selectedRows: string[]) => void;
10
18
  }
11
- export type TableSize = 'sm' | 'md' | 'lg';
19
+ /** Table visual variants for different styling approaches */
12
20
  export type TableVariant = 'default' | 'striped' | 'bordered' | 'compact';
21
+ /** Text alignment options for table cells and headers */
13
22
  export type TableAlignment = 'left' | 'center' | 'right';
23
+ /** Selection control types for row selection */
14
24
  export type SelectionType = 'checkbox' | 'radio';
25
+ /**
26
+ * Column definition for table data display and behavior
27
+ */
15
28
  export interface Column<T = any> {
29
+ /** Unique identifier for the column */
16
30
  id: string;
31
+ /** Header content - can be string or React element */
17
32
  header: string | ReactNode;
33
+ /** Property key or function to extract cell data from row object */
18
34
  accessor: keyof T | ((row: T) => any);
35
+ /** Optional custom renderer for cell content */
19
36
  cell?: (row: T) => ReactNode;
37
+ /** Enable sorting for this column */
20
38
  sortable?: boolean;
39
+ /** Enable filtering for this column */
21
40
  filterable?: boolean;
41
+ /** Truncate long content with ellipsis */
22
42
  ellipsis?: boolean;
43
+ /** Show tooltip on hover - boolean or function returning tooltip text */
23
44
  tooltip?: boolean | ((row: T) => string);
45
+ /** Fixed width for the column */
24
46
  width?: string | number;
47
+ /** Text alignment for column content */
25
48
  align?: TableAlignment;
49
+ /** Whether column is hidden by default */
26
50
  hidden?: boolean;
51
+ /** Whether column is locked and cannot be hidden or reordered */
27
52
  locked?: boolean;
28
53
  }
54
+ /**
55
+ * Configuration for column sorting state
56
+ */
29
57
  export interface SortConfig {
58
+ /** ID of the column being sorted */
30
59
  columnId: string;
60
+ /** Sort direction - ascending or descending */
31
61
  direction: 'asc' | 'desc';
62
+ /** Priority for multi-column sorting (lower numbers = higher priority) */
32
63
  priority: number;
33
64
  }
65
+ /**
66
+ * Configuration for column filtering state
67
+ */
34
68
  export interface FilterConfig {
69
+ /** ID of the column being filtered */
35
70
  columnId: string;
71
+ /** Filter value - type depends on column data type */
36
72
  value: any;
37
73
  }
38
74
  export interface TableThemeOverrides {
39
75
  baseStyle?: string;
40
76
  variants?: Partial<Record<TableVariant, string>>;
41
- sizes?: Partial<Record<TableSize, string>>;
42
77
  headerStyle?: string;
43
78
  cellStyle?: string;
44
79
  rowStyle?: string;
@@ -49,19 +84,11 @@ export interface TableThemeOverrides {
49
84
  frozenHeaderStyle?: string;
50
85
  bodyStyle?: string;
51
86
  headerContainerStyle?: string;
52
- paginationContainer?: string;
53
- paginationLeftSection?: string;
54
- paginationRightSection?: string;
55
- paginationLabel?: string;
56
- paginationSelect?: string;
57
- paginationButton?: string;
58
- paginationInfo?: string;
59
87
  columnManagerButton?: string;
60
88
  columnManagerContainer?: string;
61
89
  }
62
90
  export interface TableContextType {
63
91
  theme: TableThemeOverrides;
64
- size: TableSize;
65
92
  variant: TableVariant;
66
93
  freezeHeader?: boolean;
67
94
  freezeFirstColumn?: boolean;
@@ -80,8 +107,15 @@ export interface TableContextType {
80
107
  selectedRows?: string[];
81
108
  onSelectionChange?: (selectedRows: string[]) => void;
82
109
  }
110
+ /**
111
+ * Main Table component props supporting both data-driven and declarative APIs
112
+ *
113
+ * @template T The type of data objects in each table row
114
+ */
83
115
  export interface TableProps<T = any> {
116
+ /** Array of data objects to display - required for data-driven API */
84
117
  data?: T[];
118
+ /** Column definitions for data display and behavior - required for data-driven API */
85
119
  columns?: Column<T>[];
86
120
  /**
87
121
  * Property name or function to extract stable row identifiers for React keys and selection.
@@ -95,18 +129,29 @@ export interface TableProps<T = any> {
95
129
  * rowKey={(row, index) => `${row.category}-${row.id}`}
96
130
  */
97
131
  rowKey?: keyof T | ((row: T, index: number) => string | number);
98
- size?: TableSize;
132
+ /** Visual variant for different table styles */
99
133
  variant?: TableVariant;
134
+ /** Theme overrides for custom styling */
100
135
  theme?: TableThemeOverrides;
136
+ /** Additional CSS classes for customization */
101
137
  className?: string;
138
+ /** Keep header visible when scrolling vertically */
102
139
  freezeHeader?: boolean;
140
+ /** Keep first column visible when scrolling horizontally */
103
141
  freezeFirstColumn?: boolean;
142
+ /** Keep last column visible when scrolling horizontally */
104
143
  freezeLastColumn?: boolean;
144
+ /** Enable sorting functionality for sortable columns */
105
145
  sortable?: boolean;
146
+ /** Current sort configuration state */
106
147
  sortConfig?: SortConfig[];
148
+ /** Callback when sort configuration changes */
107
149
  onSortChange?: (sortConfig: SortConfig[]) => void;
150
+ /** Enable filtering functionality for filterable columns */
108
151
  filterable?: boolean;
152
+ /** Current filter configuration state */
109
153
  filterConfig?: FilterConfig[];
154
+ /** Callback when filter configuration changes */
110
155
  onFilterChange?: (filterConfig: FilterConfig[]) => void;
111
156
  expandable?: boolean;
112
157
  expandedRowRender?: (row: T) => ReactNode;
@@ -125,8 +170,6 @@ export interface TableProps<T = any> {
125
170
  pageSize: number;
126
171
  currentPage: number;
127
172
  totalItems: number;
128
- onPageChange: (page: number) => void;
129
- onPageSizeChange: (pageSize: number) => void;
130
173
  };
131
174
  children?: ReactNode;
132
175
  }
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { TableActionsMenuProps } from './TableActions.types';
2
+ import { TableActionsMenuProps } from './TableActions/TableActions.types';
3
3
  /**
4
4
  * TableActionsMenu component for displaying actions in an overflow menu
5
5
  */
@@ -1,4 +1,20 @@
1
1
  export interface TableColumnManagerThemeOverrides {
2
2
  container?: string;
3
+ content?: string;
4
+ header?: string;
5
+ title?: string;
6
+ description?: string;
7
+ actions?: string;
8
+ quickActionButton?: string;
9
+ quickActionButtonDisabled?: string;
10
+ columnList?: string;
11
+ columnItem?: string;
12
+ columnItemVisible?: string;
13
+ checkbox?: string;
14
+ columnLabel?: string;
15
+ columnIcon?: string;
16
+ footer?: string;
17
+ summary?: string;
18
+ closeButton?: string;
3
19
  }
4
20
  export declare const tableColumnManagerTheme: Required<TableColumnManagerThemeOverrides>;
@@ -0,0 +1,17 @@
1
+ import React from "react";
2
+ import { TablePaginationProps } from "./TablePagination.types";
3
+ /**
4
+ * TablePagination provides a standardized pagination interface for tables
5
+ * Combines the core Pagination component with page size selection controls
6
+ *
7
+ * @example
8
+ * <Table.Pagination
9
+ * currentPage={currentPage}
10
+ * totalItems={data.length}
11
+ * pageSize={pageSize}
12
+ * onPageChange={setCurrentPage}
13
+ * onPageSizeChange={setPageSize}
14
+ * pageSizeOptions={[10, 25, 50, 100]}
15
+ * />
16
+ */
17
+ export declare const TablePagination: React.FC<TablePaginationProps>;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * TablePagination component props for seamless integration with Table component
3
+ */
4
+ export interface TablePaginationProps {
5
+ /** Current active page number (1-based) */
6
+ currentPage: number;
7
+ /** Total number of items across all pages */
8
+ totalItems: number;
9
+ /** Number of items per page */
10
+ pageSize: number;
11
+ /** Available page size options */
12
+ pageSizeOptions?: number[];
13
+ /** Callback when page changes */
14
+ onPageChange: (page: number) => void;
15
+ /** Callback when page size changes */
16
+ onPageSizeChange: (pageSize: number) => void;
17
+ /** Whether to show the page size selector */
18
+ showPageSizeSelector?: boolean;
19
+ /** Additional CSS classes */
20
+ className?: string;
21
+ }
@@ -0,0 +1,2 @@
1
+ export { TablePagination } from "./TablePagination";
2
+ export type { TablePaginationProps } from "./TablePagination.types";
@@ -1,7 +1,9 @@
1
- import { TableProps, Column, SortConfig, FilterConfig, TableThemeOverrides, TableSize, TableVariant, TableAlignment, SelectionType, TableHeaderProps, TableBodyProps, TableRowProps, TableCellProps, TableHeaderCellProps, BulkAction } from './Table.types';
1
+ import { TableProps, Column, SortConfig, FilterConfig, TableThemeOverrides, TableVariant, TableAlignment, SelectionType, TableHeaderProps, TableBodyProps, TableRowProps, TableCellProps, TableHeaderCellProps, BulkAction } from './Table.types';
2
2
  import { TableActions } from './components/TableActions/TableActions';
3
3
  import { TableActionsMenu } from './components/TableActions/TableActionsMenu';
4
+ import { TablePagination } from './components/TablePagination';
4
5
  import { ActionItem, ActionVariant, ActionPriority, TableActionsProps, TableActionsMenuProps } from './components/TableActions/TableActions.types';
6
+ import { TablePaginationProps } from './components/TablePagination/TablePagination.types';
5
7
  interface TableCompound {
6
8
  <T extends Record<string, any>>(props: TableProps<T>): React.ReactElement;
7
9
  Header: React.FC<TableHeaderProps>;
@@ -10,9 +12,10 @@ interface TableCompound {
10
12
  Cell: React.FC<TableCellProps>;
11
13
  HeaderCell: React.FC<TableHeaderCellProps>;
12
14
  Actions: typeof TableActions;
15
+ Pagination: React.FC<TablePaginationProps>;
13
16
  }
14
17
  declare const Table: TableCompound;
15
18
  export { Table };
16
19
  export default Table;
17
- export type { TableProps, Column, SortConfig, FilterConfig, TableThemeOverrides, TableSize, TableVariant, TableAlignment, SelectionType, TableHeaderProps, TableBodyProps, TableRowProps, TableCellProps, TableHeaderCellProps, BulkAction, ActionItem, ActionVariant, ActionPriority, TableActionsProps, TableActionsMenuProps, };
18
- export { TableActions, TableActionsMenu };
20
+ export type { TableProps, Column, SortConfig, FilterConfig, TableThemeOverrides, TableVariant, TableAlignment, SelectionType, TableHeaderProps, TableBodyProps, TableRowProps, TableCellProps, TableHeaderCellProps, BulkAction, ActionItem, ActionVariant, ActionPriority, TableActionsProps, TableActionsMenuProps, TablePaginationProps, };
21
+ export { TableActions, TableActionsMenu, TablePagination };
@@ -4,16 +4,20 @@ export interface AlertTheme {
4
4
  baseStyle: string;
5
5
  variants: Record<AlertVariant, string>;
6
6
  iconStyle: string;
7
+ contentStyle: string;
7
8
  titleStyle: string;
8
9
  descriptionStyle: string;
10
+ childrenStyle: string;
9
11
  closeButtonStyle: string;
10
12
  }
11
13
  export interface AlertThemeOverrides {
12
14
  baseStyle?: string;
13
15
  variants?: Partial<Record<AlertVariant, string>>;
14
16
  iconStyle?: string;
17
+ contentStyle?: string;
15
18
  titleStyle?: string;
16
19
  descriptionStyle?: string;
20
+ childrenStyle?: string;
17
21
  closeButtonStyle?: string;
18
22
  }
19
23
  export interface AlertProps extends HTMLAttributes<HTMLDivElement> {
@@ -44,23 +44,29 @@ export interface ChatMessageProps extends React.HTMLAttributes<HTMLDivElement> {
44
44
  }
45
45
  export interface ChatMessageTheme {
46
46
  baseStyle: string;
47
+ avatarContainerStyle: string;
48
+ messageContainerStyle: string;
47
49
  bubbleBaseStyle: string;
48
- variants: {
49
- [K in ChatMessageVariant]: {
50
- container: string;
51
- bubble: string;
52
- timestamp: string;
53
- };
54
- };
50
+ messageTextStyle: string;
51
+ timeStyle: string;
52
+ senderContainerStyle: string;
53
+ senderBubbleStyle: string;
54
+ senderTimestampStyle: string;
55
+ receiverContainerStyle: string;
56
+ receiverBubbleStyle: string;
57
+ receiverTimestampStyle: string;
55
58
  }
56
59
  export interface ChatMessageThemeOverrides {
57
60
  baseStyle?: string;
61
+ avatarContainerStyle?: string;
62
+ messageContainerStyle?: string;
58
63
  bubbleBaseStyle?: string;
59
- variants?: Partial<{
60
- [K in ChatMessageVariant]: Partial<{
61
- container: string;
62
- bubble: string;
63
- timestamp: string;
64
- }>;
65
- }>;
64
+ messageTextStyle?: string;
65
+ timeStyle?: string;
66
+ senderContainerStyle?: string;
67
+ senderBubbleStyle?: string;
68
+ senderTimestampStyle?: string;
69
+ receiverContainerStyle?: string;
70
+ receiverBubbleStyle?: string;
71
+ receiverTimestampStyle?: string;
66
72
  }
@@ -1,22 +1,12 @@
1
- import { EmptyVariant } from "./Empty.types";
2
1
  /**
3
- * Internal theme structure for the Empty component
2
+ * Simplified theme structure for the Empty component - only essential customizable styles
4
3
  */
5
- interface EmptyTheme {
4
+ export interface EmptyTheme {
6
5
  baseStyle: string;
7
- variants: Record<EmptyVariant, string>;
8
- elements: {
9
- container: string;
10
- imageContainer: string;
11
- image: string;
12
- iconContainer: string;
13
- title: string;
14
- description: string;
15
- actionContainer: string;
16
- };
6
+ titleStyle: string;
7
+ descriptionStyle: string;
17
8
  }
18
9
  /**
19
10
  * Default theme for the Empty component
20
11
  */
21
12
  export declare const emptyTheme: EmptyTheme;
22
- export {};
@@ -3,17 +3,21 @@ import React from "react";
3
3
  * Empty component props for displaying empty states and placeholders
4
4
  */
5
5
  export interface EmptyProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
6
- /** The visual style variant of the empty state */
7
- variant?: EmptyVariant;
8
6
  /** Primary title/heading text */
9
7
  title?: React.ReactNode;
10
8
  /** Descriptive text explaining the empty state */
11
9
  description?: React.ReactNode;
12
- /** Optional image source for illustration */
10
+ /**
11
+ * Optional image source for illustration
12
+ * Note: If both image and icon are provided, image takes precedence
13
+ */
13
14
  image?: string;
14
15
  /** Alt text for the image (required if image is provided) */
15
16
  imageAlt?: string;
16
- /** Optional icon component (used when no image is provided) */
17
+ /**
18
+ * Optional icon component (displayed only when no image is provided)
19
+ * Note: If both image and icon are provided, image takes precedence
20
+ */
17
21
  icon?: React.ReactNode;
18
22
  /** Optional action element (button, link, etc.) */
19
23
  action?: React.ReactNode;
@@ -22,19 +26,3 @@ export interface EmptyProps extends Omit<React.HTMLAttributes<HTMLDivElement>, '
22
26
  /** Children content (overrides all other content when provided) */
23
27
  children?: React.ReactNode;
24
28
  }
25
- /** Visual variants for different empty state contexts */
26
- export type EmptyVariant = "default" | "error" | "loading" | "search" | "create";
27
- /** Theme configuration overrides for Empty component */
28
- export interface EmptyThemeOverrides {
29
- baseStyle?: string;
30
- variants?: Partial<Record<EmptyVariant, string>>;
31
- elements?: {
32
- container?: string;
33
- imageContainer?: string;
34
- image?: string;
35
- iconContainer?: string;
36
- title?: string;
37
- description?: string;
38
- actionContainer?: string;
39
- };
40
- }
@@ -1,3 +1,3 @@
1
1
  export { default } from "./Empty";
2
- export type { EmptyProps, EmptyVariant, EmptyThemeOverrides } from "./Empty.types";
3
- export { emptyTheme } from "./Empty.theme";
2
+ export type { EmptyProps } from "./Empty.types";
3
+ export { emptyTheme, type EmptyTheme } from "./Empty.theme";
@@ -1,2 +1,17 @@
1
- import { NotificationTheme } from './Notification.types';
1
+ import { NotificationVariant } from './Notification.types';
2
+ /**
3
+ * Comprehensive variant theme system for the Notification component
4
+ */
5
+ export interface NotificationVariantTheme {
6
+ containerStyle: string;
7
+ iconColor: string;
8
+ titleColor: string;
9
+ defaultIcon: React.ComponentType<any>;
10
+ }
11
+ export interface NotificationTheme {
12
+ baseStyle: string;
13
+ titleStyle: string;
14
+ descriptionStyle: string;
15
+ variants: Record<NotificationVariant, NotificationVariantTheme>;
16
+ }
2
17
  export declare const notificationTheme: NotificationTheme;
@@ -1,32 +1,5 @@
1
1
  import { HTMLAttributes, ReactNode } from 'react';
2
- export type NotificationVariant = 'info' | 'success' | 'warning' | 'error';
3
- export interface NotificationAction {
4
- label: string;
5
- onClick: () => void;
6
- variant?: 'primary' | 'secondary';
7
- }
8
- export interface NotificationTheme {
9
- baseStyle: string;
10
- variants: Record<NotificationVariant, string>;
11
- avatarStyle: string;
12
- iconStyle: string;
13
- titleStyle: string;
14
- descriptionStyle: string;
15
- actionsStyle: string;
16
- actionButtonStyle: string;
17
- closeButtonStyle: string;
18
- }
19
- export interface NotificationThemeOverrides {
20
- baseStyle?: string;
21
- variants?: Partial<Record<NotificationVariant, string>>;
22
- avatarStyle?: string;
23
- iconStyle?: string;
24
- titleStyle?: string;
25
- descriptionStyle?: string;
26
- actionsStyle?: string;
27
- actionButtonStyle?: string;
28
- closeButtonStyle?: string;
29
- }
2
+ export type NotificationVariant = 'default' | 'info' | 'success' | 'warning' | 'error';
30
3
  export interface NotificationProps extends HTMLAttributes<HTMLDivElement> {
31
4
  /** The visual style variant of the notification */
32
5
  variant?: NotificationVariant;
@@ -34,22 +7,27 @@ export interface NotificationProps extends HTMLAttributes<HTMLDivElement> {
34
7
  title: string;
35
8
  /** Additional description text */
36
9
  description?: string;
37
- /** Avatar or icon to display */
10
+ /** Avatar to display (takes precedence over icons) */
38
11
  avatar?: ReactNode;
39
- /** Custom icon for the notification */
40
- icon?: ReactNode;
41
- /** Whether to show the default icon for the variant */
42
- showIcon?: boolean;
43
- /** Action buttons for the notification */
44
- actions?: NotificationAction[];
45
- /** Whether the notification can be dismissed */
46
- dismissible?: boolean;
47
- /** Callback when the notification is dismissed */
12
+ /**
13
+ * Custom icon for the notification
14
+ * - Provide custom icon: overrides the default variant icon
15
+ * - Set to null: hides icon completely
16
+ * - Leave undefined: shows default variant icon
17
+ */
18
+ icon?: ReactNode | null;
19
+ /**
20
+ * Action buttons as ReactNode - use Button components directly
21
+ * Example: actions={<><Button>Cancel</Button><Button variant="primary">Save</Button></>}
22
+ */
23
+ actions?: ReactNode;
24
+ /**
25
+ * Callback when the notification is dismissed
26
+ * Note: Providing this callback automatically makes the notification dismissible
27
+ */
48
28
  onDismiss?: () => void;
49
29
  /** Custom class name */
50
30
  className?: string;
51
- /** Theme overrides */
52
- theme?: NotificationThemeOverrides;
53
31
  /** Children content */
54
32
  children?: ReactNode;
55
33
  }
@@ -1,3 +1,3 @@
1
1
  export { Notification } from './Notification';
2
- export type { NotificationProps, NotificationTheme, NotificationThemeOverrides, NotificationAction } from './Notification.types';
3
- export { notificationTheme } from './Notification.theme';
2
+ export type { NotificationProps, NotificationVariant } from './Notification.types';
3
+ export { notificationTheme, type NotificationTheme } from './Notification.theme';
@@ -0,0 +1,31 @@
1
+ export declare const toastAnimations: {
2
+ initial: {
3
+ opacity: number;
4
+ y: number;
5
+ scale: number;
6
+ };
7
+ exit: {
8
+ opacity: number;
9
+ scale: number;
10
+ transition: {
11
+ duration: number;
12
+ };
13
+ };
14
+ transition: {
15
+ type: "spring";
16
+ stiffness: number;
17
+ damping: number;
18
+ mass: number;
19
+ };
20
+ };
21
+ export declare const getToastStackingAnimation: (index: number, totalToasts: number, isExpanded: boolean) => {
22
+ y?: undefined;
23
+ scale?: undefined;
24
+ zIndex?: undefined;
25
+ opacity?: undefined;
26
+ } | {
27
+ y: number;
28
+ scale: number;
29
+ zIndex: number;
30
+ opacity: number;
31
+ };
@@ -41,7 +41,7 @@ export interface ToastProps extends HTMLAttributes<HTMLDivElement> {
41
41
  toast: ToastData;
42
42
  /** Custom class name */
43
43
  className?: string;
44
- /** Theme overrides */
44
+ /** Theme overrides (deprecated - use className for customization) */
45
45
  theme?: ToastThemeOverrides;
46
46
  /** Callback when toast is dismissed */
47
47
  onDismiss?: (id: string) => void;
@@ -3,9 +3,9 @@ export type { AlertProps, AlertTheme, AlertThemeOverrides } from './Alert';
3
3
  export { Toast, ToastProvider, useToast, useToastContext } from './Toast';
4
4
  export type { ToastProps, ToastData, ToastProviderProps, ToastTheme, ToastThemeOverrides, UseToastReturn, UseToastOptions, } from './Toast';
5
5
  export { Notification } from './Notification';
6
- export type { NotificationProps, NotificationTheme, NotificationThemeOverrides, NotificationAction } from './Notification';
7
- export { Spinner } from './Spinner';
6
+ export type { NotificationProps, NotificationVariant, NotificationTheme } from './Notification';
7
+ export { default as Spinner } from './Spinner';
8
8
  export { ChatMessage } from './ChatMessage';
9
9
  export type { ChatMessageProps, ChatMessageVariant, ChatMessageAvatarProps, ChatMessageTheme, ChatMessageThemeOverrides } from './ChatMessage';
10
10
  export { default as Empty } from './Empty';
11
- export type { EmptyProps, EmptyVariant, EmptyThemeOverrides } from './Empty';
11
+ export type { EmptyProps, EmptyTheme } from './Empty';
@@ -10,8 +10,8 @@ import ForwardRef$1 from '../../../node_modules/@heroicons/react/24/outline/esm/
10
10
  * Checkbox component for selecting one or more options
11
11
  */
12
12
  var Checkbox = function (_a) {
13
- var id = _a.id, name = _a.name, value = _a.value, controlledChecked = _a.checked, _b = _a.indeterminate, indeterminate = _b === void 0 ? false : _b, onChange = _a.onChange, label = _a.label, description = _a.description, _c = _a.state, state = _c === void 0 ? "default" : _c, themeOverrides = _a.theme, className = _a.className, restProps = __rest(_a, ["id", "name", "value", "checked", "indeterminate", "onChange", "label", "description", "state", "theme", "className"]);
14
- var _d = useState(false), internalChecked = _d[0], setInternalChecked = _d[1];
13
+ var id = _a.id, name = _a.name, value = _a.value, controlledChecked = _a.checked, _b = _a.indeterminate, indeterminate = _b === void 0 ? false : _b, onChange = _a.onChange, label = _a.label, description = _a.description, _c = _a.state, state = _c === void 0 ? "default" : _c, _d = _a.size, size = _d === void 0 ? "md" : _d, className = _a.className, restProps = __rest(_a, ["id", "name", "value", "checked", "indeterminate", "onChange", "label", "description", "state", "size", "className"]);
14
+ var _e = useState(false), internalChecked = _e[0], setInternalChecked = _e[1];
15
15
  var inputRef = useRef(null);
16
16
  // Determine if component is controlled or uncontrolled
17
17
  var isControlled = controlledChecked !== undefined;
@@ -24,7 +24,6 @@ var Checkbox = function (_a) {
24
24
  }, [indeterminate]);
25
25
  // Derive state flags
26
26
  var isDisabled = state === "disabled";
27
- var isInvalid = state === "invalid";
28
27
  var handleChange = function (e) {
29
28
  if (isDisabled)
30
29
  return;
@@ -33,19 +32,14 @@ var Checkbox = function (_a) {
33
32
  }
34
33
  onChange === null || onChange === void 0 ? void 0 : onChange(e.target.checked, value);
35
34
  };
36
- // Create state class for CSS selectors (like other components)
37
- var stateClass = isInvalid
38
- ? "state-invalid"
39
- : isDisabled
40
- ? "state-disabled"
41
- : "state-default";
42
- return (React__default.createElement("div", __assign({ className: cn(checkboxTheme.container, stateClass, themeOverrides === null || themeOverrides === void 0 ? void 0 : themeOverrides.container, className) }, restProps),
43
- React__default.createElement("div", { className: cn(checkboxTheme.inputContainer, themeOverrides === null || themeOverrides === void 0 ? void 0 : themeOverrides.inputContainer) },
44
- React__default.createElement("input", { ref: inputRef, type: "checkbox", id: id, name: name, value: value, checked: isChecked, onChange: handleChange, disabled: isDisabled, "aria-describedby": description ? "".concat(id, "-description") : undefined, "aria-invalid": isInvalid, className: cn(checkboxTheme.input, themeOverrides === null || themeOverrides === void 0 ? void 0 : themeOverrides.input) }),
45
- (isChecked || indeterminate) && (indeterminate ? (React__default.createElement(ForwardRef, { className: cn(checkboxTheme.checkmark, themeOverrides === null || themeOverrides === void 0 ? void 0 : themeOverrides.checkmark), strokeWidth: 3 })) : isDisabled ? (React__default.createElement(ForwardRef, { className: cn(checkboxTheme.checkmark, themeOverrides === null || themeOverrides === void 0 ? void 0 : themeOverrides.checkmark), strokeWidth: 3 })) : (React__default.createElement(ForwardRef$1, { className: cn(checkboxTheme.checkmark, themeOverrides === null || themeOverrides === void 0 ? void 0 : themeOverrides.checkmark), strokeWidth: 3 })))),
46
- (label || description) && (React__default.createElement("div", { className: cn(checkboxTheme.labelContainer, themeOverrides === null || themeOverrides === void 0 ? void 0 : themeOverrides.labelContainer) },
47
- label && React__default.createElement(FormLabel, { htmlFor: id, className: "!mb-0", state: state }, label),
48
- description && (React__default.createElement("div", { id: "".concat(id, "-description"), className: cn(checkboxTheme.description, themeOverrides === null || themeOverrides === void 0 ? void 0 : themeOverrides.description) }, description))))));
35
+ return (React__default.createElement("div", __assign({ className: cn(checkboxTheme.baseStyle, className) }, restProps),
36
+ React__default.createElement("div", { className: cn(checkboxTheme.inputContainerStyle, checkboxTheme.sizes[size]) },
37
+ React__default.createElement("input", { ref: inputRef, type: "checkbox", id: id, name: name, value: value, checked: isChecked, onChange: handleChange, disabled: isDisabled, "aria-describedby": description ? "".concat(id, "-description") : undefined, "data-state": isDisabled ? "disabled" : "default", className: cn(checkboxTheme.inputStyle, checkboxTheme.sizes[size], indeterminate && "bg-neutral-200") }),
38
+ indeterminate && (React__default.createElement(ForwardRef, { className: cn("pointer-events-none col-start-1 row-start-1 self-center justify-self-center opacity-100 stroke-neutral-600 transition-opacity duration-200", size === "sm" ? "size-3" : "size-4"), strokeWidth: 3 })),
39
+ isChecked && !indeterminate && (React__default.createElement(ForwardRef$1, { className: cn("pointer-events-none col-start-1 row-start-1 self-center justify-self-center opacity-100 stroke-white transition-opacity duration-200", size === "sm" ? "size-3" : "size-4"), strokeWidth: 3 }))),
40
+ (label || description) && (React__default.createElement("div", { className: "cursor-pointer" },
41
+ label && (React__default.createElement(FormLabel, { htmlFor: id, className: "!mb-0", state: state }, label)),
42
+ description && (React__default.createElement("div", { id: "".concat(id, "-description"), className: checkboxTheme.descriptionStyle }, description))))));
49
43
  };
50
44
 
51
45
  export { Checkbox, Checkbox as default };
@@ -2,12 +2,14 @@
2
2
  * Default theme configuration for the Checkbox component
3
3
  */
4
4
  var checkboxTheme = {
5
- container: "relative flex items-start gap-3",
6
- inputContainer: "relative flex-shrink-0 group grid size-6 grid-cols-1",
7
- labelContainer: "cursor-pointer",
8
- input: "col-start-1 row-start-1 appearance-none rounded-md border-2 border-gray-300 bg-white size-6 checked:border-primary-600 checked:bg-primary-600 disabled:border-gray-300 disabled:bg-gray-100 disabled:checked:bg-gray-100 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 checked:outline-2 checked:outline-primary-100 checked:outline-offset-1 transition-all duration-400",
9
- checkmark: "pointer-events-none col-start-1 row-start-1 size-4 self-center justify-self-center opacity-0 group-has-[:checked]:opacity-100 stroke-white group-has-[:disabled]:stroke-neutral-400 transition-opacity duration-200",
10
- description: "text-sm text-text-secondary mt-1",
5
+ baseStyle: "relative flex items-start gap-3",
6
+ inputContainerStyle: "relative flex-shrink-0 group grid grid-cols-1",
7
+ inputStyle: "col-start-1 row-start-1 appearance-none rounded-md border-2 border-gray-300 bg-white checked:border-primary-base checked:bg-primary-base disabled:border-gray-300 disabled:bg-gray-100 disabled:checked:bg-gray-100 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 checked:outline-2 checked:outline-primary-100 checked:outline-offset-1 transition-all duration-400 data-[state=disabled]:border-gray-300 data-[state=disabled]:bg-gray-100",
8
+ descriptionStyle: "text-base text-text-secondary mt-0.5",
9
+ sizes: {
10
+ sm: "size-5 mt-0.25",
11
+ md: "size-6"
12
+ }
11
13
  };
12
14
 
13
15
  export { checkboxTheme };