widenarrow-ui 2.3.0 → 2.3.2
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/lib/index.css +1 -1
- package/lib/index.d.ts +64 -83
- package/lib/index.esm.css +1 -1
- package/lib/index.esm.js +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -1082,6 +1082,8 @@ interface LinkProps {
|
|
|
1082
1082
|
icon?: Partial<IconTypes>;
|
|
1083
1083
|
/** @default ColorTypes.CURRENT */
|
|
1084
1084
|
iconColor?: Partial<ColorTypes>;
|
|
1085
|
+
/** @default SizeTypes.MEDIUM */
|
|
1086
|
+
iconSize?: SizeTypes.SMALL | SizeTypes.MEDIUM | SizeTypes.LARGE | SizeTypes.AUTO | undefined;
|
|
1085
1087
|
/** @default '_blank' */
|
|
1086
1088
|
target?: '_blank' | '_self';
|
|
1087
1089
|
children?: ReactNode;
|
|
@@ -1187,6 +1189,9 @@ interface ListButtonProps {
|
|
|
1187
1189
|
labelClassName?: string;
|
|
1188
1190
|
iconClassName?: string;
|
|
1189
1191
|
icon?: Partial<IconTypes>;
|
|
1192
|
+
/** Applied to the icon if in a Link component. Otherwise, size is inherited from the button's size.
|
|
1193
|
+
* @default SizeTypes.SMALL */
|
|
1194
|
+
iconSize?: SizeTypes.SMALL | SizeTypes.MEDIUM | SizeTypes.LARGE | SizeTypes.AUTO | undefined;
|
|
1190
1195
|
/** Shown at the end of the row at all times, for badges, spinners or status dots. */
|
|
1191
1196
|
rightComponent?: ReactNode;
|
|
1192
1197
|
/**
|
|
@@ -1223,7 +1228,7 @@ interface ListButtonProps {
|
|
|
1223
1228
|
* is an InlineButton and its props carry through; with `to` it is a link.
|
|
1224
1229
|
*/
|
|
1225
1230
|
declare const ListButton: {
|
|
1226
|
-
({ text, to, className, buttonClassName, labelClassName, iconClassName, icon, rightComponent, hoverComponent, selected, disabled, size, id, ariaLabel, toolTip, tabIndex, autoFocus, buttonRef, onClickCallback }: ListButtonProps): JSX.Element;
|
|
1231
|
+
({ text, to, className, buttonClassName, labelClassName, iconClassName, icon, iconSize, rightComponent, hoverComponent, selected, disabled, size, id, ariaLabel, toolTip, tabIndex, autoFocus, buttonRef, onClickCallback }: ListButtonProps): JSX.Element;
|
|
1227
1232
|
displayName: string;
|
|
1228
1233
|
};
|
|
1229
1234
|
|
|
@@ -1416,7 +1421,63 @@ interface SortableTableProps {
|
|
|
1416
1421
|
* @default TableTypes.RULED
|
|
1417
1422
|
*/
|
|
1418
1423
|
type?: TableTypes.RULED | TableTypes.CARDS;
|
|
1419
|
-
/**
|
|
1424
|
+
/**
|
|
1425
|
+
* Column configuration, in render order. Each entry accepts:
|
|
1426
|
+
*
|
|
1427
|
+
* **`key`** — `string`, required
|
|
1428
|
+
*
|
|
1429
|
+
* Row key whose value fills the column when there is no `customCellComponent`. Always the sort key: it is what `onSortCallback` reports and what `sortBy` is matched against.
|
|
1430
|
+
*
|
|
1431
|
+
* **`title`** — `string`, required
|
|
1432
|
+
*
|
|
1433
|
+
* Heading text.
|
|
1434
|
+
*
|
|
1435
|
+
* **`width`** — `string`, required
|
|
1436
|
+
*
|
|
1437
|
+
* A percentage (`'25%'`) or a fixed value (`'120px'`), applied inline to the header and body cells.
|
|
1438
|
+
*
|
|
1439
|
+
* **`disableSort`** — `boolean`, defaults to `false`
|
|
1440
|
+
*
|
|
1441
|
+
* Renders the heading as static text with no sort button.
|
|
1442
|
+
*
|
|
1443
|
+
* **`alignRight`** — `boolean`, defaults to `false`
|
|
1444
|
+
*
|
|
1445
|
+
* Right-aligns the cell, and moves the sort chevron to the left of the heading.
|
|
1446
|
+
*
|
|
1447
|
+
* **`alignCenter`** — `boolean`, defaults to `false`
|
|
1448
|
+
*
|
|
1449
|
+
* Centres the cell.
|
|
1450
|
+
*
|
|
1451
|
+
* **`withEllipsis`** — `boolean`, defaults to `false`
|
|
1452
|
+
*
|
|
1453
|
+
* Truncates overflowing content with an ellipsis instead of wrapping.
|
|
1454
|
+
*
|
|
1455
|
+
* **`toolTip`** — `string`
|
|
1456
|
+
*
|
|
1457
|
+
* Tooltip on the heading. Falls back to `title` when omitted.
|
|
1458
|
+
*
|
|
1459
|
+
* **`className`** — `string`
|
|
1460
|
+
*
|
|
1461
|
+
* Applied to the content span inside each body cell, not to the cell itself.
|
|
1462
|
+
*
|
|
1463
|
+
* **`customHeaderCellComponent`** — `(cell) => ReactNode`
|
|
1464
|
+
*
|
|
1465
|
+
* Replaces the entire heading, sort button included.
|
|
1466
|
+
*
|
|
1467
|
+
* **`customCellComponent`** — `(row) => ReactNode`
|
|
1468
|
+
*
|
|
1469
|
+
* Replaces the cell value. Receives the whole row, so it can read keys other than `key`.
|
|
1470
|
+
*
|
|
1471
|
+
* ------------------------------------------------------------
|
|
1472
|
+
*
|
|
1473
|
+
* `width`, `alignRight`, `alignCenter`, `withEllipsis` and `className` apply whether or not the column
|
|
1474
|
+
* has a `customCellComponent` — they sit on the cell and its content span, which wrap a custom cell too.
|
|
1475
|
+
* Only `key` changes meaning: with a custom cell it still drives sorting, but no longer supplies the
|
|
1476
|
+
* displayed value.
|
|
1477
|
+
*
|
|
1478
|
+
* A `customHeaderCellComponent` replaces the heading before any of it is built, so `title`, `toolTip`
|
|
1479
|
+
* and `disableSort` stop having any effect on that column's heading — including its sort button.
|
|
1480
|
+
*/
|
|
1420
1481
|
cells: Array<SortableTableCellInterface>;
|
|
1421
1482
|
/** Row objects. Each is passed to `customCellComponent`, and indexed by `cell.key` otherwise. */
|
|
1422
1483
|
data: Array<any>;
|
|
@@ -1466,86 +1527,6 @@ declare const SortableTable: {
|
|
|
1466
1527
|
displayName: string;
|
|
1467
1528
|
};
|
|
1468
1529
|
|
|
1469
|
-
interface TableAction {
|
|
1470
|
-
icon: Partial<IconTypes>;
|
|
1471
|
-
/** Tooltip, and the accessible name of the button. Required, because the button has no visible text. */
|
|
1472
|
-
toolTip: string;
|
|
1473
|
-
onClickCallback: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
1474
|
-
/** @default false */
|
|
1475
|
-
disabled?: boolean;
|
|
1476
|
-
id?: string;
|
|
1477
|
-
}
|
|
1478
|
-
interface TableActionsCellProps {
|
|
1479
|
-
/** Buttons to render, in order. */
|
|
1480
|
-
actions: Array<TableAction>;
|
|
1481
|
-
/** Size of every button in the group. @default SizeTypes.SMALL */
|
|
1482
|
-
size?: SizeTypes.SMALL | SizeTypes.MEDIUM | SizeTypes.LARGE;
|
|
1483
|
-
/** Text shown before the buttons. For bulk headers, e.g. "3 selected". */
|
|
1484
|
-
label?: string;
|
|
1485
|
-
className?: string;
|
|
1486
|
-
}
|
|
1487
|
-
|
|
1488
|
-
declare const TableActionsCell: FC<TableActionsCellProps>;
|
|
1489
|
-
|
|
1490
|
-
interface TableSelectionCellProps {
|
|
1491
|
-
/** Whether this row is selected. */
|
|
1492
|
-
checked: boolean;
|
|
1493
|
-
/** Fired with the next selected state. */
|
|
1494
|
-
onChangeCallback: (checked: boolean) => void;
|
|
1495
|
-
/** Accessible name for the checkbox, e.g. `Select ${row.name}`. Never rendered visibly. */
|
|
1496
|
-
label: string;
|
|
1497
|
-
/** @default false */
|
|
1498
|
-
disabled?: boolean;
|
|
1499
|
-
className?: string;
|
|
1500
|
-
}
|
|
1501
|
-
|
|
1502
|
-
declare const TableSelectionCell: FC<TableSelectionCellProps>;
|
|
1503
|
-
|
|
1504
|
-
interface TableSelectionHeaderCellProps {
|
|
1505
|
-
/** How many rows are currently selected. Drives both the checked and indeterminate states. */
|
|
1506
|
-
selectedCount: number;
|
|
1507
|
-
/** How many rows are selectable in total. Usually the full result count, not just the loaded page. */
|
|
1508
|
-
totalCount: number;
|
|
1509
|
-
/** Fired with the next selected state: true to select every row, false to clear the selection. */
|
|
1510
|
-
onChangeCallback: (selectAll: boolean) => void;
|
|
1511
|
-
/** Accessible name for the checkbox. Never rendered visibly. */
|
|
1512
|
-
label: string;
|
|
1513
|
-
/**
|
|
1514
|
-
* Bulk actions revealed once at least one row is selected. Supply already-translated tooltips.
|
|
1515
|
-
* Omit to keep the header as a plain select-all checkbox.
|
|
1516
|
-
*/
|
|
1517
|
-
actions?: Array<TableAction>;
|
|
1518
|
-
/** Text beside the bulk actions, e.g. `${selectedCount} selected`. Only shown when `actions` are present. */
|
|
1519
|
-
selectedLabel?: string;
|
|
1520
|
-
/** @default false */
|
|
1521
|
-
disabled?: boolean;
|
|
1522
|
-
className?: string;
|
|
1523
|
-
}
|
|
1524
|
-
|
|
1525
|
-
declare const TableSelectionHeaderCell: FC<TableSelectionHeaderCellProps>;
|
|
1526
|
-
|
|
1527
|
-
interface TableTextCellProps {
|
|
1528
|
-
/** Primary value. */
|
|
1529
|
-
text: string | number;
|
|
1530
|
-
/** Second line below `text`, rendered smaller and muted. For the common "name over email" cell. */
|
|
1531
|
-
secondaryText?: string | number;
|
|
1532
|
-
/** Colour of the primary line. Use for status values such as an inactive row. */
|
|
1533
|
-
color?: Partial<ColorTypes>;
|
|
1534
|
-
/** Weight of the primary line. @default '400' */
|
|
1535
|
-
fontWeight?: TypographyFontWeight;
|
|
1536
|
-
/**
|
|
1537
|
-
* Truncates both lines with an ellipsis. A tooltip carrying the full text is added automatically,
|
|
1538
|
-
* so truncated values stay readable.
|
|
1539
|
-
* @default false
|
|
1540
|
-
*/
|
|
1541
|
-
withEllipsis?: boolean;
|
|
1542
|
-
/** Overrides the tooltip that `withEllipsis` derives from `text`. Set on its own to add a tooltip without truncating. */
|
|
1543
|
-
toolTip?: string;
|
|
1544
|
-
className?: string;
|
|
1545
|
-
}
|
|
1546
|
-
|
|
1547
|
-
declare const TableTextCell: FC<TableTextCellProps>;
|
|
1548
|
-
|
|
1549
1530
|
interface SwitchButtonProps {
|
|
1550
1531
|
checked: boolean;
|
|
1551
1532
|
id?: string;
|
|
@@ -1838,4 +1819,4 @@ declare const NoDataMessage: {
|
|
|
1838
1819
|
displayName: string;
|
|
1839
1820
|
};
|
|
1840
1821
|
|
|
1841
|
-
export { AppColors, AspectRatioTypes, BorderInterface, Box, Button, Card, Checkbox, ColorStyleInterface, ColorTypes, DropDown, DropDownItem, DropDownRef, FacetButton, FlexStylingInterface, FontFamilyTypes, FormSkeleton, Grid, Heading, HierarchyInterface, HierarchyTypes, Icon, IconButton, IconStyleInterface, IconTypes, Image, InlineButton, Input, Label, Link, LinkTypes, ListButton, ListButtonProps, ListItem, ListSkeleton, MarginInterface, MultiActionButton, NoDataMessage, PaddingInterface, Pagination, Paragraph, RadioButton, SelectInput, Separator, SizeStyleInterface, SizeTypes, SkeletonItem, SolidSpinner, SortableTable, SortableTableCellInterface, SortableTableProps, Span, SwitchButton, Tab, TabGroup, TabGroupProps, TabIndicatorProps, TabProps, TabValue,
|
|
1822
|
+
export { AppColors, AspectRatioTypes, BorderInterface, Box, Button, Card, Checkbox, ColorStyleInterface, ColorTypes, DropDown, DropDownItem, DropDownRef, FacetButton, FlexStylingInterface, FontFamilyTypes, FormSkeleton, Grid, Heading, HierarchyInterface, HierarchyTypes, Icon, IconButton, IconStyleInterface, IconTypes, Image, InlineButton, Input, Label, Link, LinkTypes, ListButton, ListButtonProps, ListItem, ListSkeleton, MarginInterface, MultiActionButton, NoDataMessage, PaddingInterface, Pagination, Paragraph, RadioButton, SelectInput, Separator, SizeStyleInterface, SizeTypes, SkeletonItem, SolidSpinner, SortableTable, SortableTableCellInterface, SortableTableProps, Span, SwitchButton, Tab, TabGroup, TabGroupProps, TabIndicatorProps, TabProps, TabValue, TableTypes, TextAreaInput, ToolTip, borderClassNames, flexClassNames, marginClassNames, paddingClassNames };
|