@algorithm-shift/design-system 1.3.104 → 1.3.106

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.mts CHANGED
@@ -244,11 +244,52 @@ interface BreadcrumbProps extends ElementProps {
244
244
  list?: Record<string, any>;
245
245
  }
246
246
 
247
+ interface ButtonGroupItem {
248
+ id?: string | number;
249
+ value?: string | number;
250
+ label?: string;
251
+ name?: string;
252
+ url?: string;
253
+ href?: string;
254
+ onClick?: () => void;
255
+ disabled?: boolean;
256
+ separator?: boolean;
257
+ [key: string]: any;
258
+ }
259
+
247
260
  interface ButtonGroupProps extends ElementProps {
261
+ // Main button props
248
262
  textContent?: string;
249
- list?: Record<string, any>;
250
- onGroupItemClick?: (data: { item: Record<string, any> }) => void;
251
- onClick?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
263
+ text?: string;
264
+
265
+ // Dropdown items
266
+ list?: ButtonGroupItem[] | string[] | Record<string, any>;
267
+ data?: ButtonGroupItem[] | string[] | Record<string, any>[];
268
+ dataKey?: string;
269
+ dataLabel?: string;
270
+
271
+ // Styling
272
+ variant?: 'default' | 'outline' | 'secondary' | 'ghost' | 'destructive';
273
+ buttonSize?: 'default' | 'sm' | 'lg' | 'icon';
274
+ buttonVariant?: 'default' | 'outline' | 'secondary' | 'ghost' | 'destructive';
275
+ dropdownVariant?: 'default' | 'outline' | 'secondary' | 'ghost' | 'destructive';
276
+
277
+ // Layout
278
+ orientation?: 'horizontal' | 'vertical';
279
+ showDropdownIcon?: boolean;
280
+ dropdownIcon?: React.ReactNode;
281
+ alignDropdown?: 'start' | 'center' | 'end';
282
+
283
+ // Behavior
284
+ onItemSelect?: (params: { item: ButtonGroupItem; index: number }) => void;
285
+ onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
286
+
287
+ // Advanced
288
+ disabled?: boolean;
289
+ loading?: boolean;
290
+ emptyStateText?: string;
291
+ maxItems?: number;
292
+ showSeparator?: boolean;
252
293
  }
253
294
  interface AccordionProps extends ElementProps {
254
295
  name?: string;
@@ -318,7 +359,7 @@ declare const Typography: ({ className, style, tagName, textContent, onClick, }:
318
359
 
319
360
  declare const Breadcrumb: ({ list, className, style }: BreadcrumbProps) => react_jsx_runtime.JSX.Element;
320
361
 
321
- declare function ButtonGroup({ style, textContent, className, list, onGroupItemClick, onClick }: ButtonGroupProps): react_jsx_runtime.JSX.Element;
362
+ declare const ButtonGroup: React$1.FC<ButtonGroupProps>;
322
363
 
323
364
  type IconSet = 'fa-css' | 'fa' | 'fontawesome' | 'lucide';
324
365
  type FAPrefix = 'fas' | 'far' | 'fab' | string;
@@ -439,7 +480,7 @@ interface ExtendedTableProps extends TableProps {
439
480
  sort_by?: string;
440
481
  sort_order?: string;
441
482
  onCellClick?: (props: CellClickProps) => void;
442
- onDeleteRow?: (props: CellClickProps) => void;
483
+ onDeleteRow?: ({ id }: { id: string }) => void;
443
484
  enableDelete?: boolean;
444
485
  enableRowSelection?: boolean;
445
486
  getRowSelection?: (rowSelection: any) => void;
package/dist/index.d.ts CHANGED
@@ -244,11 +244,52 @@ interface BreadcrumbProps extends ElementProps {
244
244
  list?: Record<string, any>;
245
245
  }
246
246
 
247
+ interface ButtonGroupItem {
248
+ id?: string | number;
249
+ value?: string | number;
250
+ label?: string;
251
+ name?: string;
252
+ url?: string;
253
+ href?: string;
254
+ onClick?: () => void;
255
+ disabled?: boolean;
256
+ separator?: boolean;
257
+ [key: string]: any;
258
+ }
259
+
247
260
  interface ButtonGroupProps extends ElementProps {
261
+ // Main button props
248
262
  textContent?: string;
249
- list?: Record<string, any>;
250
- onGroupItemClick?: (data: { item: Record<string, any> }) => void;
251
- onClick?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
263
+ text?: string;
264
+
265
+ // Dropdown items
266
+ list?: ButtonGroupItem[] | string[] | Record<string, any>;
267
+ data?: ButtonGroupItem[] | string[] | Record<string, any>[];
268
+ dataKey?: string;
269
+ dataLabel?: string;
270
+
271
+ // Styling
272
+ variant?: 'default' | 'outline' | 'secondary' | 'ghost' | 'destructive';
273
+ buttonSize?: 'default' | 'sm' | 'lg' | 'icon';
274
+ buttonVariant?: 'default' | 'outline' | 'secondary' | 'ghost' | 'destructive';
275
+ dropdownVariant?: 'default' | 'outline' | 'secondary' | 'ghost' | 'destructive';
276
+
277
+ // Layout
278
+ orientation?: 'horizontal' | 'vertical';
279
+ showDropdownIcon?: boolean;
280
+ dropdownIcon?: React.ReactNode;
281
+ alignDropdown?: 'start' | 'center' | 'end';
282
+
283
+ // Behavior
284
+ onItemSelect?: (params: { item: ButtonGroupItem; index: number }) => void;
285
+ onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
286
+
287
+ // Advanced
288
+ disabled?: boolean;
289
+ loading?: boolean;
290
+ emptyStateText?: string;
291
+ maxItems?: number;
292
+ showSeparator?: boolean;
252
293
  }
253
294
  interface AccordionProps extends ElementProps {
254
295
  name?: string;
@@ -318,7 +359,7 @@ declare const Typography: ({ className, style, tagName, textContent, onClick, }:
318
359
 
319
360
  declare const Breadcrumb: ({ list, className, style }: BreadcrumbProps) => react_jsx_runtime.JSX.Element;
320
361
 
321
- declare function ButtonGroup({ style, textContent, className, list, onGroupItemClick, onClick }: ButtonGroupProps): react_jsx_runtime.JSX.Element;
362
+ declare const ButtonGroup: React$1.FC<ButtonGroupProps>;
322
363
 
323
364
  type IconSet = 'fa-css' | 'fa' | 'fontawesome' | 'lucide';
324
365
  type FAPrefix = 'fas' | 'far' | 'fab' | string;
@@ -439,7 +480,7 @@ interface ExtendedTableProps extends TableProps {
439
480
  sort_by?: string;
440
481
  sort_order?: string;
441
482
  onCellClick?: (props: CellClickProps) => void;
442
- onDeleteRow?: (props: CellClickProps) => void;
483
+ onDeleteRow?: ({ id }: { id: string }) => void;
443
484
  enableDelete?: boolean;
444
485
  enableRowSelection?: boolean;
445
486
  getRowSelection?: (rowSelection: any) => void;