@nurix/ui-component-library 1.1.3-stage.91 → 1.1.3-stage.93
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 +232 -1
- package/dist/index.d.ts +232 -1
- package/dist/index.js +889 -4
- package/dist/index.mjs +892 -4
- package/dist/styles.css +312 -0
- package/package.json +5 -2
package/dist/index.d.mts
CHANGED
|
@@ -5,6 +5,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
5
5
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
6
6
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
7
7
|
import { Toaster as Toaster$1 } from 'sonner';
|
|
8
|
+
import { LucideIcon } from 'lucide-react';
|
|
8
9
|
|
|
9
10
|
type ButtonBorderRadius = "none" | "soft" | "rounded";
|
|
10
11
|
type ButtonVariant = "primary" | "secondary" | "destructive" | "outline" | "link" | "iconPrimary" | "iconSecondary" | "iconOutline";
|
|
@@ -1093,6 +1094,7 @@ declare const DEFAULT_THEME: {
|
|
|
1093
1094
|
readonly warning: "#fef3c7";
|
|
1094
1095
|
readonly warningForeground: "#78350f";
|
|
1095
1096
|
readonly switchTrack: "#e5e5e5";
|
|
1097
|
+
readonly hover: "#0a0a0a1a";
|
|
1096
1098
|
};
|
|
1097
1099
|
readonly darkMode: {
|
|
1098
1100
|
readonly background: "#1e1e1e";
|
|
@@ -1136,6 +1138,7 @@ declare const DEFAULT_THEME: {
|
|
|
1136
1138
|
readonly warning: "#fde68a";
|
|
1137
1139
|
readonly warningForeground: "#78350f";
|
|
1138
1140
|
readonly switchTrack: "#ffffff";
|
|
1141
|
+
readonly hover: "#ffffff1a";
|
|
1139
1142
|
};
|
|
1140
1143
|
};
|
|
1141
1144
|
readonly components: {
|
|
@@ -1398,4 +1401,232 @@ interface ShadowDOMWrapperProps {
|
|
|
1398
1401
|
*/
|
|
1399
1402
|
declare const ShadowDOMWrapper: React$1.FC<ShadowDOMWrapperProps>;
|
|
1400
1403
|
|
|
1401
|
-
|
|
1404
|
+
/**
|
|
1405
|
+
* Cell content can be:
|
|
1406
|
+
* - string: plain text
|
|
1407
|
+
* - CellTextContent: text with optional className/style
|
|
1408
|
+
* - React.ReactNode: any renderable node (icon, badge, custom element)
|
|
1409
|
+
*
|
|
1410
|
+
* Figma reference node: 3338:6396
|
|
1411
|
+
*/
|
|
1412
|
+
type CellTextContent = {
|
|
1413
|
+
text: string;
|
|
1414
|
+
className?: string;
|
|
1415
|
+
style?: React$1.CSSProperties;
|
|
1416
|
+
};
|
|
1417
|
+
type CellContent = string | CellTextContent | React$1.ReactNode;
|
|
1418
|
+
type SortDirection = "asc" | "desc";
|
|
1419
|
+
interface SortState {
|
|
1420
|
+
key: string;
|
|
1421
|
+
direction: SortDirection | null;
|
|
1422
|
+
}
|
|
1423
|
+
/**
|
|
1424
|
+
* Column width size options.
|
|
1425
|
+
* Defaults to "md" (160px).
|
|
1426
|
+
*/
|
|
1427
|
+
declare enum ColumnWidth {
|
|
1428
|
+
xs = "xs",
|
|
1429
|
+
sm = "sm",
|
|
1430
|
+
md = "md",
|
|
1431
|
+
lg = "lg",
|
|
1432
|
+
xl = "xl"
|
|
1433
|
+
}
|
|
1434
|
+
interface ColumnDef<TRow> {
|
|
1435
|
+
/**
|
|
1436
|
+
* Unique identifier for the column. Used for pinning and sort state.
|
|
1437
|
+
*/
|
|
1438
|
+
key: string;
|
|
1439
|
+
/**
|
|
1440
|
+
* Display label shown in the column header.
|
|
1441
|
+
*/
|
|
1442
|
+
header: string;
|
|
1443
|
+
/**
|
|
1444
|
+
* Returns the cell content for a given row.
|
|
1445
|
+
*/
|
|
1446
|
+
accessor: (row: TRow) => CellContent;
|
|
1447
|
+
/**
|
|
1448
|
+
* Whether this column supports sorting. Clicking the header cycles
|
|
1449
|
+
* null → asc → desc → null and fires onSortChange.
|
|
1450
|
+
*/
|
|
1451
|
+
isSortable?: boolean;
|
|
1452
|
+
/**
|
|
1453
|
+
* Current sort direction for this column. When set, this column is sorted.
|
|
1454
|
+
* Updated by the consumer in onSortChange.
|
|
1455
|
+
*/
|
|
1456
|
+
sort_direction?: SortDirection | null;
|
|
1457
|
+
/**
|
|
1458
|
+
* Column width size. Defaults to "md" (160px).
|
|
1459
|
+
* Required for accurate sticky offsets on pinned columns.
|
|
1460
|
+
*/
|
|
1461
|
+
width?: ColumnWidth;
|
|
1462
|
+
}
|
|
1463
|
+
interface TableAction<TRow> {
|
|
1464
|
+
/**
|
|
1465
|
+
* Tooltip label shown on hover.
|
|
1466
|
+
*/
|
|
1467
|
+
label: string;
|
|
1468
|
+
/**
|
|
1469
|
+
* Icon rendered inside the action button.
|
|
1470
|
+
*/
|
|
1471
|
+
icon?: React$1.ReactNode;
|
|
1472
|
+
/**
|
|
1473
|
+
* Called when the action button is clicked.
|
|
1474
|
+
*/
|
|
1475
|
+
onClick: (row: TRow) => void;
|
|
1476
|
+
}
|
|
1477
|
+
interface PaginationProps {
|
|
1478
|
+
handlePageChange: (page: number) => void;
|
|
1479
|
+
rowsPerPage: number;
|
|
1480
|
+
setRowsPerPage: (rowsPerPage: number) => void;
|
|
1481
|
+
currentPage: number;
|
|
1482
|
+
total: number;
|
|
1483
|
+
entityName?: string;
|
|
1484
|
+
}
|
|
1485
|
+
interface DataTableProps<TRow> {
|
|
1486
|
+
/**
|
|
1487
|
+
* Column definitions in display order. Pinned columns will be
|
|
1488
|
+
* reordered to the front automatically.
|
|
1489
|
+
*/
|
|
1490
|
+
columns: ColumnDef<TRow>[];
|
|
1491
|
+
/**
|
|
1492
|
+
* Rows to render on the current page.
|
|
1493
|
+
*/
|
|
1494
|
+
data: TRow[];
|
|
1495
|
+
/**
|
|
1496
|
+
* Array of column keys to pin. Listed in the desired left-to-right order.
|
|
1497
|
+
* Pinned columns are sticky and separated by a vertical line.
|
|
1498
|
+
*/
|
|
1499
|
+
pinnedColumns?: string[];
|
|
1500
|
+
/**
|
|
1501
|
+
* When true, renders a checkbox column as the first column.
|
|
1502
|
+
*/
|
|
1503
|
+
showCheckbox?: boolean;
|
|
1504
|
+
/**
|
|
1505
|
+
* Action buttons rendered in the last (Actions) column.
|
|
1506
|
+
*/
|
|
1507
|
+
actions?: TableAction<TRow>[];
|
|
1508
|
+
/**
|
|
1509
|
+
* Returns a stable unique ID for a row (used for selection).
|
|
1510
|
+
* Defaults to JSON.stringify if not provided.
|
|
1511
|
+
*/
|
|
1512
|
+
getRowId?: (row: TRow) => string;
|
|
1513
|
+
/**
|
|
1514
|
+
* Controlled selected row IDs.
|
|
1515
|
+
*/
|
|
1516
|
+
selectedRows?: string[];
|
|
1517
|
+
/**
|
|
1518
|
+
* Called when selection changes.
|
|
1519
|
+
*/
|
|
1520
|
+
onSelectionChange?: (ids: string[]) => void;
|
|
1521
|
+
/**
|
|
1522
|
+
* Called when sort state changes. The consumer should update columns to set
|
|
1523
|
+
* sort_direction on the sorted column (or clear it when sort is null).
|
|
1524
|
+
*/
|
|
1525
|
+
onSortChange?: (sort: SortState | null) => void;
|
|
1526
|
+
currentPage: number;
|
|
1527
|
+
rowsPerPage: number;
|
|
1528
|
+
total: number;
|
|
1529
|
+
onPageChange: (page: number) => void;
|
|
1530
|
+
onRowsPerPageChange: (rowsPerPage: number) => void;
|
|
1531
|
+
entityName?: string;
|
|
1532
|
+
className?: string;
|
|
1533
|
+
}
|
|
1534
|
+
|
|
1535
|
+
/**
|
|
1536
|
+
* Pagination controls: rows-per-page selector + page navigation.
|
|
1537
|
+
* Can also be used standalone outside of DataTable.
|
|
1538
|
+
*
|
|
1539
|
+
* Figma reference node: 3338:6396
|
|
1540
|
+
*/
|
|
1541
|
+
declare function Pagination({ handlePageChange, rowsPerPage, setRowsPerPage, currentPage, total, entityName, }: PaginationProps): react_jsx_runtime.JSX.Element;
|
|
1542
|
+
declare namespace Pagination {
|
|
1543
|
+
var displayName: string;
|
|
1544
|
+
}
|
|
1545
|
+
/**
|
|
1546
|
+
* A fully-featured data table with:
|
|
1547
|
+
* - Column pinning (sticky with vertical divider)
|
|
1548
|
+
* - Horizontal scrolling
|
|
1549
|
+
* - Optional checkbox selection column
|
|
1550
|
+
* - Flexible cell content (text, styled text, icon, badge, or any React node)
|
|
1551
|
+
* - Sortable columns (consumer-driven — fires onSortChange)
|
|
1552
|
+
* - Row action buttons
|
|
1553
|
+
* - Pagination via Pagination
|
|
1554
|
+
*
|
|
1555
|
+
* Figma reference node: 3338:6396
|
|
1556
|
+
*/
|
|
1557
|
+
declare function DataTable<TRow>({ columns, data, pinnedColumns, showCheckbox, actions, getRowId, selectedRows, onSelectionChange, onSortChange, currentPage, rowsPerPage, total, onPageChange, onRowsPerPageChange, entityName, className, }: DataTableProps<TRow>): react_jsx_runtime.JSX.Element;
|
|
1558
|
+
declare namespace DataTable {
|
|
1559
|
+
var displayName: string;
|
|
1560
|
+
}
|
|
1561
|
+
|
|
1562
|
+
/**
|
|
1563
|
+
* Filter item structure
|
|
1564
|
+
*/
|
|
1565
|
+
interface FilterItem<T = string> {
|
|
1566
|
+
value: T;
|
|
1567
|
+
label: string;
|
|
1568
|
+
}
|
|
1569
|
+
/**
|
|
1570
|
+
* Props for FilterSelect component
|
|
1571
|
+
*/
|
|
1572
|
+
interface FilterSelectProps<T = string> extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "onChange"> {
|
|
1573
|
+
/** Filter label displayed in the trigger button */
|
|
1574
|
+
label?: string;
|
|
1575
|
+
/** Icon displayed on the left side of the trigger */
|
|
1576
|
+
icon?: LucideIcon;
|
|
1577
|
+
/** Array of selected item values */
|
|
1578
|
+
selectedItems?: T[];
|
|
1579
|
+
/** Available items for selection */
|
|
1580
|
+
items: FilterItem<T>[];
|
|
1581
|
+
/** Enable drag-and-drop reordering (default: false) */
|
|
1582
|
+
draggable?: boolean;
|
|
1583
|
+
/** Callback when selection changes */
|
|
1584
|
+
onSelectionChange?: (values: T[]) => void;
|
|
1585
|
+
/** Callback when order changes (draggable mode) */
|
|
1586
|
+
onOrderChange?: (values: T[]) => void;
|
|
1587
|
+
/** Max width for selected items display (default: "35ch") */
|
|
1588
|
+
selectedItemsMaxWidth?: string;
|
|
1589
|
+
/** Override classes for selected items display area */
|
|
1590
|
+
selectedItemsClassName?: string;
|
|
1591
|
+
/** Default open state */
|
|
1592
|
+
defaultOpen?: boolean;
|
|
1593
|
+
/** Controlled open state */
|
|
1594
|
+
open?: boolean;
|
|
1595
|
+
/** Callback when open state changes */
|
|
1596
|
+
onOpenChange?: (open: boolean) => void;
|
|
1597
|
+
/** Max height for dropdown content (default: "20vh") */
|
|
1598
|
+
dropdownMaxHeight?: string;
|
|
1599
|
+
}
|
|
1600
|
+
/**
|
|
1601
|
+
* Props for FilterListItem component
|
|
1602
|
+
*/
|
|
1603
|
+
interface FilterListItemProps<T = string> {
|
|
1604
|
+
/** Unique item value */
|
|
1605
|
+
value: T;
|
|
1606
|
+
/** Display text */
|
|
1607
|
+
label: string;
|
|
1608
|
+
/** Selection state */
|
|
1609
|
+
selected?: boolean;
|
|
1610
|
+
/** Show drag handle */
|
|
1611
|
+
draggable?: boolean;
|
|
1612
|
+
/** Selection handler */
|
|
1613
|
+
onSelect?: (value: T) => void;
|
|
1614
|
+
/** Hover state (for stories) */
|
|
1615
|
+
hover?: boolean;
|
|
1616
|
+
/** Additional className */
|
|
1617
|
+
className?: string;
|
|
1618
|
+
}
|
|
1619
|
+
|
|
1620
|
+
declare const FilterSelect: React$1.ForwardRefExoticComponent<FilterSelectProps<string> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1621
|
+
|
|
1622
|
+
declare const FilterListItem: React$1.ForwardRefExoticComponent<FilterListItemProps<string> & {
|
|
1623
|
+
onDragStart?: (e: React$1.DragEvent) => void;
|
|
1624
|
+
onDragOver?: (e: React$1.DragEvent) => void;
|
|
1625
|
+
onDragLeave?: (e: React$1.DragEvent) => void;
|
|
1626
|
+
onDrop?: (e: React$1.DragEvent) => void;
|
|
1627
|
+
onDragEnd?: (e: React$1.DragEvent) => void;
|
|
1628
|
+
isDragging?: boolean;
|
|
1629
|
+
isDragOver?: boolean;
|
|
1630
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
1631
|
+
|
|
1632
|
+
export { Accordion, AccordionContent, AccordionContentPlaceholder, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, type AccordionType, type AccordionValue, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarShape, type AvatarSize, type BackButtonPosition, Badge, type BadgeProps, type BadgeVariant, Button, type ButtonBorderRadius, type ButtonProps, type ButtonSize, type ButtonVariant, type CellContent, type CellTextContent, Checkbox, type CheckboxProps, type ColumnDef, ColumnWidth, DEFAULT_THEME, DataTable, type DataTableProps, Dialog, DialogBody, type DialogBodyProps, DialogFooter, type DialogFooterProps, DialogHeader, DialogHeaderNavigation, type DialogHeaderNavigationProps, type DialogHeaderNavigationVariant, type DialogHeaderProps, DialogIcon, type DialogIconProps, type DialogProps, type DialogSize, type DialogType, EmptyState, type EmptyStateProps, FileInput, type FileInputProps, type FilterItem, FilterListItem, type FilterListItemProps, FilterSelect, type FilterSelectProps, Input, type InputBorderRadius, type InputForceState, InputGroup, type InputGroupBorderRadius, type InputGroupForceState, type InputGroupProps, type InputProps, LegoLandWrapper, type LegoLandWrapperProps, List, type ListBorderRadius, type ListProps, type ListType, type ListVariant, NumberBadge, type NumberBadgeProps, type NumberBadgeVariant, NurixThemeProvider, Pagination, type PaginationProps, PlaySelect, type PlaySelectAudioItem, type PlaySelectProps, PlaybackControl, type PlaybackControlProps, type PlaybackState, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, Select, SelectContent, type SelectContentItem, SelectFormLabel, SelectGroup, type SelectGroupProps, SelectItem, SelectLabel, type SelectLabelProps, type SelectMenuItemProps, type SelectProps, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, ShadowDOMWrapper, type ShowToastOptions, type SortDirection, type SortState, type StepItem, type StepState, Stepper, StepperBar, type StepperBarProps, type StepperProps, type SupportingTextType, Switch, type SwitchProps, type SwitchSize, type TabVariant, type TableAction, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, Textarea, type TextareaProps, ThemeProvider, Toast, type ToastProps, type ToastVariant, Toaster, Tooltip, TooltipContent, type TooltipContentProps, TooltipProvider, TooltipTrigger, Typography, type TypographyProps, type TypographyTone, type TypographyVariant, type UsePlaySelectProps, type UseSelectProps, showToast, usePlaySelect, useSelect, useTheme };
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
5
5
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
6
6
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
7
7
|
import { Toaster as Toaster$1 } from 'sonner';
|
|
8
|
+
import { LucideIcon } from 'lucide-react';
|
|
8
9
|
|
|
9
10
|
type ButtonBorderRadius = "none" | "soft" | "rounded";
|
|
10
11
|
type ButtonVariant = "primary" | "secondary" | "destructive" | "outline" | "link" | "iconPrimary" | "iconSecondary" | "iconOutline";
|
|
@@ -1093,6 +1094,7 @@ declare const DEFAULT_THEME: {
|
|
|
1093
1094
|
readonly warning: "#fef3c7";
|
|
1094
1095
|
readonly warningForeground: "#78350f";
|
|
1095
1096
|
readonly switchTrack: "#e5e5e5";
|
|
1097
|
+
readonly hover: "#0a0a0a1a";
|
|
1096
1098
|
};
|
|
1097
1099
|
readonly darkMode: {
|
|
1098
1100
|
readonly background: "#1e1e1e";
|
|
@@ -1136,6 +1138,7 @@ declare const DEFAULT_THEME: {
|
|
|
1136
1138
|
readonly warning: "#fde68a";
|
|
1137
1139
|
readonly warningForeground: "#78350f";
|
|
1138
1140
|
readonly switchTrack: "#ffffff";
|
|
1141
|
+
readonly hover: "#ffffff1a";
|
|
1139
1142
|
};
|
|
1140
1143
|
};
|
|
1141
1144
|
readonly components: {
|
|
@@ -1398,4 +1401,232 @@ interface ShadowDOMWrapperProps {
|
|
|
1398
1401
|
*/
|
|
1399
1402
|
declare const ShadowDOMWrapper: React$1.FC<ShadowDOMWrapperProps>;
|
|
1400
1403
|
|
|
1401
|
-
|
|
1404
|
+
/**
|
|
1405
|
+
* Cell content can be:
|
|
1406
|
+
* - string: plain text
|
|
1407
|
+
* - CellTextContent: text with optional className/style
|
|
1408
|
+
* - React.ReactNode: any renderable node (icon, badge, custom element)
|
|
1409
|
+
*
|
|
1410
|
+
* Figma reference node: 3338:6396
|
|
1411
|
+
*/
|
|
1412
|
+
type CellTextContent = {
|
|
1413
|
+
text: string;
|
|
1414
|
+
className?: string;
|
|
1415
|
+
style?: React$1.CSSProperties;
|
|
1416
|
+
};
|
|
1417
|
+
type CellContent = string | CellTextContent | React$1.ReactNode;
|
|
1418
|
+
type SortDirection = "asc" | "desc";
|
|
1419
|
+
interface SortState {
|
|
1420
|
+
key: string;
|
|
1421
|
+
direction: SortDirection | null;
|
|
1422
|
+
}
|
|
1423
|
+
/**
|
|
1424
|
+
* Column width size options.
|
|
1425
|
+
* Defaults to "md" (160px).
|
|
1426
|
+
*/
|
|
1427
|
+
declare enum ColumnWidth {
|
|
1428
|
+
xs = "xs",
|
|
1429
|
+
sm = "sm",
|
|
1430
|
+
md = "md",
|
|
1431
|
+
lg = "lg",
|
|
1432
|
+
xl = "xl"
|
|
1433
|
+
}
|
|
1434
|
+
interface ColumnDef<TRow> {
|
|
1435
|
+
/**
|
|
1436
|
+
* Unique identifier for the column. Used for pinning and sort state.
|
|
1437
|
+
*/
|
|
1438
|
+
key: string;
|
|
1439
|
+
/**
|
|
1440
|
+
* Display label shown in the column header.
|
|
1441
|
+
*/
|
|
1442
|
+
header: string;
|
|
1443
|
+
/**
|
|
1444
|
+
* Returns the cell content for a given row.
|
|
1445
|
+
*/
|
|
1446
|
+
accessor: (row: TRow) => CellContent;
|
|
1447
|
+
/**
|
|
1448
|
+
* Whether this column supports sorting. Clicking the header cycles
|
|
1449
|
+
* null → asc → desc → null and fires onSortChange.
|
|
1450
|
+
*/
|
|
1451
|
+
isSortable?: boolean;
|
|
1452
|
+
/**
|
|
1453
|
+
* Current sort direction for this column. When set, this column is sorted.
|
|
1454
|
+
* Updated by the consumer in onSortChange.
|
|
1455
|
+
*/
|
|
1456
|
+
sort_direction?: SortDirection | null;
|
|
1457
|
+
/**
|
|
1458
|
+
* Column width size. Defaults to "md" (160px).
|
|
1459
|
+
* Required for accurate sticky offsets on pinned columns.
|
|
1460
|
+
*/
|
|
1461
|
+
width?: ColumnWidth;
|
|
1462
|
+
}
|
|
1463
|
+
interface TableAction<TRow> {
|
|
1464
|
+
/**
|
|
1465
|
+
* Tooltip label shown on hover.
|
|
1466
|
+
*/
|
|
1467
|
+
label: string;
|
|
1468
|
+
/**
|
|
1469
|
+
* Icon rendered inside the action button.
|
|
1470
|
+
*/
|
|
1471
|
+
icon?: React$1.ReactNode;
|
|
1472
|
+
/**
|
|
1473
|
+
* Called when the action button is clicked.
|
|
1474
|
+
*/
|
|
1475
|
+
onClick: (row: TRow) => void;
|
|
1476
|
+
}
|
|
1477
|
+
interface PaginationProps {
|
|
1478
|
+
handlePageChange: (page: number) => void;
|
|
1479
|
+
rowsPerPage: number;
|
|
1480
|
+
setRowsPerPage: (rowsPerPage: number) => void;
|
|
1481
|
+
currentPage: number;
|
|
1482
|
+
total: number;
|
|
1483
|
+
entityName?: string;
|
|
1484
|
+
}
|
|
1485
|
+
interface DataTableProps<TRow> {
|
|
1486
|
+
/**
|
|
1487
|
+
* Column definitions in display order. Pinned columns will be
|
|
1488
|
+
* reordered to the front automatically.
|
|
1489
|
+
*/
|
|
1490
|
+
columns: ColumnDef<TRow>[];
|
|
1491
|
+
/**
|
|
1492
|
+
* Rows to render on the current page.
|
|
1493
|
+
*/
|
|
1494
|
+
data: TRow[];
|
|
1495
|
+
/**
|
|
1496
|
+
* Array of column keys to pin. Listed in the desired left-to-right order.
|
|
1497
|
+
* Pinned columns are sticky and separated by a vertical line.
|
|
1498
|
+
*/
|
|
1499
|
+
pinnedColumns?: string[];
|
|
1500
|
+
/**
|
|
1501
|
+
* When true, renders a checkbox column as the first column.
|
|
1502
|
+
*/
|
|
1503
|
+
showCheckbox?: boolean;
|
|
1504
|
+
/**
|
|
1505
|
+
* Action buttons rendered in the last (Actions) column.
|
|
1506
|
+
*/
|
|
1507
|
+
actions?: TableAction<TRow>[];
|
|
1508
|
+
/**
|
|
1509
|
+
* Returns a stable unique ID for a row (used for selection).
|
|
1510
|
+
* Defaults to JSON.stringify if not provided.
|
|
1511
|
+
*/
|
|
1512
|
+
getRowId?: (row: TRow) => string;
|
|
1513
|
+
/**
|
|
1514
|
+
* Controlled selected row IDs.
|
|
1515
|
+
*/
|
|
1516
|
+
selectedRows?: string[];
|
|
1517
|
+
/**
|
|
1518
|
+
* Called when selection changes.
|
|
1519
|
+
*/
|
|
1520
|
+
onSelectionChange?: (ids: string[]) => void;
|
|
1521
|
+
/**
|
|
1522
|
+
* Called when sort state changes. The consumer should update columns to set
|
|
1523
|
+
* sort_direction on the sorted column (or clear it when sort is null).
|
|
1524
|
+
*/
|
|
1525
|
+
onSortChange?: (sort: SortState | null) => void;
|
|
1526
|
+
currentPage: number;
|
|
1527
|
+
rowsPerPage: number;
|
|
1528
|
+
total: number;
|
|
1529
|
+
onPageChange: (page: number) => void;
|
|
1530
|
+
onRowsPerPageChange: (rowsPerPage: number) => void;
|
|
1531
|
+
entityName?: string;
|
|
1532
|
+
className?: string;
|
|
1533
|
+
}
|
|
1534
|
+
|
|
1535
|
+
/**
|
|
1536
|
+
* Pagination controls: rows-per-page selector + page navigation.
|
|
1537
|
+
* Can also be used standalone outside of DataTable.
|
|
1538
|
+
*
|
|
1539
|
+
* Figma reference node: 3338:6396
|
|
1540
|
+
*/
|
|
1541
|
+
declare function Pagination({ handlePageChange, rowsPerPage, setRowsPerPage, currentPage, total, entityName, }: PaginationProps): react_jsx_runtime.JSX.Element;
|
|
1542
|
+
declare namespace Pagination {
|
|
1543
|
+
var displayName: string;
|
|
1544
|
+
}
|
|
1545
|
+
/**
|
|
1546
|
+
* A fully-featured data table with:
|
|
1547
|
+
* - Column pinning (sticky with vertical divider)
|
|
1548
|
+
* - Horizontal scrolling
|
|
1549
|
+
* - Optional checkbox selection column
|
|
1550
|
+
* - Flexible cell content (text, styled text, icon, badge, or any React node)
|
|
1551
|
+
* - Sortable columns (consumer-driven — fires onSortChange)
|
|
1552
|
+
* - Row action buttons
|
|
1553
|
+
* - Pagination via Pagination
|
|
1554
|
+
*
|
|
1555
|
+
* Figma reference node: 3338:6396
|
|
1556
|
+
*/
|
|
1557
|
+
declare function DataTable<TRow>({ columns, data, pinnedColumns, showCheckbox, actions, getRowId, selectedRows, onSelectionChange, onSortChange, currentPage, rowsPerPage, total, onPageChange, onRowsPerPageChange, entityName, className, }: DataTableProps<TRow>): react_jsx_runtime.JSX.Element;
|
|
1558
|
+
declare namespace DataTable {
|
|
1559
|
+
var displayName: string;
|
|
1560
|
+
}
|
|
1561
|
+
|
|
1562
|
+
/**
|
|
1563
|
+
* Filter item structure
|
|
1564
|
+
*/
|
|
1565
|
+
interface FilterItem<T = string> {
|
|
1566
|
+
value: T;
|
|
1567
|
+
label: string;
|
|
1568
|
+
}
|
|
1569
|
+
/**
|
|
1570
|
+
* Props for FilterSelect component
|
|
1571
|
+
*/
|
|
1572
|
+
interface FilterSelectProps<T = string> extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "onChange"> {
|
|
1573
|
+
/** Filter label displayed in the trigger button */
|
|
1574
|
+
label?: string;
|
|
1575
|
+
/** Icon displayed on the left side of the trigger */
|
|
1576
|
+
icon?: LucideIcon;
|
|
1577
|
+
/** Array of selected item values */
|
|
1578
|
+
selectedItems?: T[];
|
|
1579
|
+
/** Available items for selection */
|
|
1580
|
+
items: FilterItem<T>[];
|
|
1581
|
+
/** Enable drag-and-drop reordering (default: false) */
|
|
1582
|
+
draggable?: boolean;
|
|
1583
|
+
/** Callback when selection changes */
|
|
1584
|
+
onSelectionChange?: (values: T[]) => void;
|
|
1585
|
+
/** Callback when order changes (draggable mode) */
|
|
1586
|
+
onOrderChange?: (values: T[]) => void;
|
|
1587
|
+
/** Max width for selected items display (default: "35ch") */
|
|
1588
|
+
selectedItemsMaxWidth?: string;
|
|
1589
|
+
/** Override classes for selected items display area */
|
|
1590
|
+
selectedItemsClassName?: string;
|
|
1591
|
+
/** Default open state */
|
|
1592
|
+
defaultOpen?: boolean;
|
|
1593
|
+
/** Controlled open state */
|
|
1594
|
+
open?: boolean;
|
|
1595
|
+
/** Callback when open state changes */
|
|
1596
|
+
onOpenChange?: (open: boolean) => void;
|
|
1597
|
+
/** Max height for dropdown content (default: "20vh") */
|
|
1598
|
+
dropdownMaxHeight?: string;
|
|
1599
|
+
}
|
|
1600
|
+
/**
|
|
1601
|
+
* Props for FilterListItem component
|
|
1602
|
+
*/
|
|
1603
|
+
interface FilterListItemProps<T = string> {
|
|
1604
|
+
/** Unique item value */
|
|
1605
|
+
value: T;
|
|
1606
|
+
/** Display text */
|
|
1607
|
+
label: string;
|
|
1608
|
+
/** Selection state */
|
|
1609
|
+
selected?: boolean;
|
|
1610
|
+
/** Show drag handle */
|
|
1611
|
+
draggable?: boolean;
|
|
1612
|
+
/** Selection handler */
|
|
1613
|
+
onSelect?: (value: T) => void;
|
|
1614
|
+
/** Hover state (for stories) */
|
|
1615
|
+
hover?: boolean;
|
|
1616
|
+
/** Additional className */
|
|
1617
|
+
className?: string;
|
|
1618
|
+
}
|
|
1619
|
+
|
|
1620
|
+
declare const FilterSelect: React$1.ForwardRefExoticComponent<FilterSelectProps<string> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1621
|
+
|
|
1622
|
+
declare const FilterListItem: React$1.ForwardRefExoticComponent<FilterListItemProps<string> & {
|
|
1623
|
+
onDragStart?: (e: React$1.DragEvent) => void;
|
|
1624
|
+
onDragOver?: (e: React$1.DragEvent) => void;
|
|
1625
|
+
onDragLeave?: (e: React$1.DragEvent) => void;
|
|
1626
|
+
onDrop?: (e: React$1.DragEvent) => void;
|
|
1627
|
+
onDragEnd?: (e: React$1.DragEvent) => void;
|
|
1628
|
+
isDragging?: boolean;
|
|
1629
|
+
isDragOver?: boolean;
|
|
1630
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
1631
|
+
|
|
1632
|
+
export { Accordion, AccordionContent, AccordionContentPlaceholder, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, type AccordionType, type AccordionValue, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarShape, type AvatarSize, type BackButtonPosition, Badge, type BadgeProps, type BadgeVariant, Button, type ButtonBorderRadius, type ButtonProps, type ButtonSize, type ButtonVariant, type CellContent, type CellTextContent, Checkbox, type CheckboxProps, type ColumnDef, ColumnWidth, DEFAULT_THEME, DataTable, type DataTableProps, Dialog, DialogBody, type DialogBodyProps, DialogFooter, type DialogFooterProps, DialogHeader, DialogHeaderNavigation, type DialogHeaderNavigationProps, type DialogHeaderNavigationVariant, type DialogHeaderProps, DialogIcon, type DialogIconProps, type DialogProps, type DialogSize, type DialogType, EmptyState, type EmptyStateProps, FileInput, type FileInputProps, type FilterItem, FilterListItem, type FilterListItemProps, FilterSelect, type FilterSelectProps, Input, type InputBorderRadius, type InputForceState, InputGroup, type InputGroupBorderRadius, type InputGroupForceState, type InputGroupProps, type InputProps, LegoLandWrapper, type LegoLandWrapperProps, List, type ListBorderRadius, type ListProps, type ListType, type ListVariant, NumberBadge, type NumberBadgeProps, type NumberBadgeVariant, NurixThemeProvider, Pagination, type PaginationProps, PlaySelect, type PlaySelectAudioItem, type PlaySelectProps, PlaybackControl, type PlaybackControlProps, type PlaybackState, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, Select, SelectContent, type SelectContentItem, SelectFormLabel, SelectGroup, type SelectGroupProps, SelectItem, SelectLabel, type SelectLabelProps, type SelectMenuItemProps, type SelectProps, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, ShadowDOMWrapper, type ShowToastOptions, type SortDirection, type SortState, type StepItem, type StepState, Stepper, StepperBar, type StepperBarProps, type StepperProps, type SupportingTextType, Switch, type SwitchProps, type SwitchSize, type TabVariant, type TableAction, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, Textarea, type TextareaProps, ThemeProvider, Toast, type ToastProps, type ToastVariant, Toaster, Tooltip, TooltipContent, type TooltipContentProps, TooltipProvider, TooltipTrigger, Typography, type TypographyProps, type TypographyTone, type TypographyVariant, type UsePlaySelectProps, type UseSelectProps, showToast, usePlaySelect, useSelect, useTheme };
|