@lumx/react 4.3.2-alpha.35 → 4.3.2-alpha.36
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/index.d.ts +8 -16
- package/index.js +6 -6
- package/index.js.map +1 -1
- package/package.json +3 -3
package/index.d.ts
CHANGED
|
@@ -3363,9 +3363,7 @@ interface TableProps$1 extends HasTheme, HasClassName {
|
|
|
3363
3363
|
/**
|
|
3364
3364
|
* Defines the props of the component.
|
|
3365
3365
|
*/
|
|
3366
|
-
interface TableProps extends GenericProps$1,
|
|
3367
|
-
/** Children */
|
|
3368
|
-
children?: React.ReactNode;
|
|
3366
|
+
interface TableProps extends GenericProps$1, ReactToJSX<TableProps$1> {
|
|
3369
3367
|
}
|
|
3370
3368
|
/**
|
|
3371
3369
|
* Table component.
|
|
@@ -3389,9 +3387,7 @@ interface TableBodyProps$1 extends HasClassName {
|
|
|
3389
3387
|
/**
|
|
3390
3388
|
* Defines the props of the component.
|
|
3391
3389
|
*/
|
|
3392
|
-
interface TableBodyProps extends GenericProps$1,
|
|
3393
|
-
/** Children */
|
|
3394
|
-
children?: React.ReactNode;
|
|
3390
|
+
interface TableBodyProps extends GenericProps$1, ReactToJSX<TableBodyProps$1> {
|
|
3395
3391
|
}
|
|
3396
3392
|
/**
|
|
3397
3393
|
* TableBody component.
|
|
@@ -3431,7 +3427,7 @@ interface TableCellProps$1 extends HasClassName {
|
|
|
3431
3427
|
/** Variant. */
|
|
3432
3428
|
variant?: TableCellVariant;
|
|
3433
3429
|
/** On header cell click callback. */
|
|
3434
|
-
|
|
3430
|
+
handleClick?(): void;
|
|
3435
3431
|
/** Children */
|
|
3436
3432
|
children?: JSXElement;
|
|
3437
3433
|
/** reference to the root element */
|
|
@@ -3441,9 +3437,9 @@ interface TableCellProps$1 extends HasClassName {
|
|
|
3441
3437
|
/**
|
|
3442
3438
|
* Defines the props of the component.
|
|
3443
3439
|
*/
|
|
3444
|
-
interface TableCellProps extends GenericProps$1,
|
|
3445
|
-
/**
|
|
3446
|
-
|
|
3440
|
+
interface TableCellProps extends GenericProps$1, ReactToJSX<TableCellProps$1> {
|
|
3441
|
+
/** On header cell click callback. */
|
|
3442
|
+
onHeaderClick?: () => void;
|
|
3447
3443
|
}
|
|
3448
3444
|
/**
|
|
3449
3445
|
* TableCell component.
|
|
@@ -3467,9 +3463,7 @@ interface TableHeaderProps$1 extends HasClassName {
|
|
|
3467
3463
|
/**
|
|
3468
3464
|
* Defines the props of the component.
|
|
3469
3465
|
*/
|
|
3470
|
-
interface TableHeaderProps extends GenericProps$1,
|
|
3471
|
-
/** Children */
|
|
3472
|
-
children?: React.ReactNode;
|
|
3466
|
+
interface TableHeaderProps extends GenericProps$1, ReactToJSX<TableHeaderProps$1, 'ref'> {
|
|
3473
3467
|
}
|
|
3474
3468
|
/**
|
|
3475
3469
|
* TableHeader component.
|
|
@@ -3499,11 +3493,9 @@ interface TableRowProps$1 extends HasClassName, HasAriaDisabled {
|
|
|
3499
3493
|
/**
|
|
3500
3494
|
* Defines the props of the component.
|
|
3501
3495
|
*/
|
|
3502
|
-
interface TableRowProps extends GenericProps$1,
|
|
3496
|
+
interface TableRowProps extends GenericProps$1, ReactToJSX<TableRowProps$1, 'tabIndex' | 'aria-disabled'> {
|
|
3503
3497
|
/** Whether the component is disabled or not. */
|
|
3504
3498
|
isDisabled?: boolean;
|
|
3505
|
-
/** Children */
|
|
3506
|
-
children?: React.ReactNode;
|
|
3507
3499
|
}
|
|
3508
3500
|
/**
|
|
3509
3501
|
* TableRow component.
|
package/index.js
CHANGED
|
@@ -13362,7 +13362,7 @@ const TableCell$1 = props => {
|
|
|
13362
13362
|
className,
|
|
13363
13363
|
icon,
|
|
13364
13364
|
isSortable,
|
|
13365
|
-
|
|
13365
|
+
handleClick,
|
|
13366
13366
|
ref,
|
|
13367
13367
|
sortOrder,
|
|
13368
13368
|
variant = DEFAULT_PROPS$e.variant,
|
|
@@ -13370,10 +13370,10 @@ const TableCell$1 = props => {
|
|
|
13370
13370
|
} = props;
|
|
13371
13371
|
|
|
13372
13372
|
// Use button if clickable
|
|
13373
|
-
const Wrapper =
|
|
13373
|
+
const Wrapper = handleClick ? 'button' : 'div';
|
|
13374
13374
|
const wrapperProps = Wrapper === 'button' ? {
|
|
13375
13375
|
type: 'button',
|
|
13376
|
-
onClick:
|
|
13376
|
+
onClick: handleClick
|
|
13377
13377
|
} : undefined;
|
|
13378
13378
|
|
|
13379
13379
|
// ARIA sort
|
|
@@ -13440,13 +13440,13 @@ const TableCell$1 = props => {
|
|
|
13440
13440
|
*/
|
|
13441
13441
|
const TableCell = forwardRef((props, ref) => {
|
|
13442
13442
|
const {
|
|
13443
|
-
|
|
13443
|
+
onHeaderClick,
|
|
13444
13444
|
...otherProps
|
|
13445
13445
|
} = props;
|
|
13446
13446
|
return TableCell$1({
|
|
13447
13447
|
ref,
|
|
13448
|
-
|
|
13449
|
-
|
|
13448
|
+
...otherProps,
|
|
13449
|
+
handleClick: onHeaderClick
|
|
13450
13450
|
});
|
|
13451
13451
|
});
|
|
13452
13452
|
TableCell.displayName = COMPONENT_NAME$a;
|