@versaur/react 1.0.9 → 1.0.11
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/blocks.d.ts +210 -100
- package/dist/blocks.js +749 -668
- package/dist/primitive.d.ts +1 -5
- package/dist/primitive.js +2 -2
- package/dist/tooltip-Zuq8gd0f.js +210 -0
- package/package.json +3 -2
- package/dist/tooltip-M8EGI3lZ.js +0 -200
package/dist/blocks.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { AppLayout as AppLayout_2 } from '@versaur/core/blocks';
|
|
2
1
|
import { AttributeList as AttributeList_2 } from '@versaur/core/blocks';
|
|
3
2
|
import { AvatarGroup as AvatarGroup_2 } from '@versaur/core/blocks';
|
|
4
3
|
import { AvatarGroupAlign } from '@versaur/core/blocks';
|
|
@@ -27,8 +26,10 @@ import { default as default_2 } from 'react';
|
|
|
27
26
|
import { DialogHTMLAttributes } from 'react';
|
|
28
27
|
import { Drawer as Drawer_2 } from '@versaur/core/blocks';
|
|
29
28
|
import { ElementType } from 'react';
|
|
29
|
+
import { FormHTMLAttributes } from 'react';
|
|
30
30
|
import { ForwardRefExoticComponent } from 'react';
|
|
31
31
|
import { HTMLAttributes } from 'react';
|
|
32
|
+
import { Icon } from '@versaur/core/primitive';
|
|
32
33
|
import { Menu as Menu_2 } from '@versaur/core/blocks';
|
|
33
34
|
import { Modal as Modal_2 } from '@versaur/core/blocks';
|
|
34
35
|
import { MouseEvent as MouseEvent_2 } from 'react';
|
|
@@ -36,8 +37,6 @@ import { ReactNode } from 'react';
|
|
|
36
37
|
import { RefAttributes } from 'react';
|
|
37
38
|
import { SVGProps } from 'react';
|
|
38
39
|
import { TableCellVariant } from '@versaur/core/blocks';
|
|
39
|
-
import { TdHTMLAttributes } from 'react';
|
|
40
|
-
import { ThHTMLAttributes } from 'react';
|
|
41
40
|
|
|
42
41
|
export declare const Accordion: AccordionComponent;
|
|
43
42
|
|
|
@@ -74,38 +73,27 @@ export declare interface AccordionSummaryProps extends HTMLAttributes<HTMLElemen
|
|
|
74
73
|
export declare const AppLayout: AppLayoutType;
|
|
75
74
|
|
|
76
75
|
declare interface AppLayoutBodyProps {
|
|
76
|
+
/** Constrains Main content to max-width and centers it */
|
|
77
|
+
centered?: boolean;
|
|
77
78
|
className?: string;
|
|
78
79
|
children?: ReactNode;
|
|
79
80
|
}
|
|
80
81
|
|
|
81
|
-
declare interface AppLayoutMainProps extends AppLayoutRegionProps {
|
|
82
|
-
/**
|
|
83
|
-
* Controls content width constraint and alignment.
|
|
84
|
-
* - 'full-width': Content uses the entire main area width
|
|
85
|
-
* - 'centred': Content is constrained to max-width and centered
|
|
86
|
-
* @default 'full-width'
|
|
87
|
-
*/
|
|
88
|
-
placement?: AppLayout_2.Placement;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
82
|
export declare interface AppLayoutRegionProps {
|
|
92
83
|
className?: string;
|
|
93
84
|
children?: ReactNode;
|
|
94
85
|
}
|
|
95
86
|
|
|
96
87
|
export declare interface AppLayoutRootProps {
|
|
97
|
-
variant?: AppLayout_2.Variant;
|
|
98
|
-
hideHeader?: boolean;
|
|
99
|
-
hideBottom?: boolean;
|
|
100
88
|
className?: string;
|
|
101
89
|
children?: ReactNode;
|
|
102
90
|
}
|
|
103
91
|
|
|
104
92
|
declare interface AppLayoutType extends ForwardRefExoticComponent<AppLayoutRootProps & RefAttributes<HTMLDivElement>> {
|
|
105
93
|
Body: ForwardRefExoticComponent<AppLayoutBodyProps & RefAttributes<HTMLDivElement>>;
|
|
106
|
-
|
|
94
|
+
Footer: ForwardRefExoticComponent<AppLayoutRegionProps & RefAttributes<HTMLElement>>;
|
|
107
95
|
Header: ForwardRefExoticComponent<AppLayoutRegionProps & RefAttributes<HTMLElement>>;
|
|
108
|
-
Main: ForwardRefExoticComponent<
|
|
96
|
+
Main: ForwardRefExoticComponent<AppLayoutRegionProps & RefAttributes<HTMLElement>>;
|
|
109
97
|
SideLeft: ForwardRefExoticComponent<AppLayoutRegionProps & RefAttributes<HTMLElement>>;
|
|
110
98
|
SideRight: ForwardRefExoticComponent<AppLayoutRegionProps & RefAttributes<HTMLElement>>;
|
|
111
99
|
}
|
|
@@ -115,9 +103,7 @@ declare interface AsProp<C extends ElementType = ElementType> {
|
|
|
115
103
|
}
|
|
116
104
|
|
|
117
105
|
export declare namespace AttributeList {
|
|
118
|
-
export type
|
|
119
|
-
export type ColumnSpan = AttributeList_2.ColumnSpan;
|
|
120
|
-
export type ContentLineClamp = AttributeList_2.ContentLineClamp;
|
|
106
|
+
export type Layout = AttributeList_2.Layout;
|
|
121
107
|
export type Props = AttributeListProps;
|
|
122
108
|
export type ItemProps = AttributeListItemProps;
|
|
123
109
|
}
|
|
@@ -133,7 +119,7 @@ declare interface AttributeListComponent extends default_2.ForwardRefExoticCompo
|
|
|
133
119
|
*
|
|
134
120
|
* @example
|
|
135
121
|
* ```tsx
|
|
136
|
-
* <AttributeList.Item
|
|
122
|
+
* <AttributeList.Item area="span 2" title="Email">
|
|
137
123
|
* john.doe@example.com
|
|
138
124
|
* </AttributeList.Item>
|
|
139
125
|
* ```
|
|
@@ -146,15 +132,9 @@ export declare interface AttributeListItemProps extends HTMLAttributes<HTMLDivEl
|
|
|
146
132
|
*/
|
|
147
133
|
title: string;
|
|
148
134
|
/**
|
|
149
|
-
*
|
|
150
|
-
* @default '1'
|
|
135
|
+
* CSS grid-column: e.g. "span 3", "1 / 4"
|
|
151
136
|
*/
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* Number of lines to display before truncating with ellipsis (1-5)
|
|
155
|
-
* @default '2'
|
|
156
|
-
*/
|
|
157
|
-
contentLineClamp?: AttributeList_2.ContentLineClamp;
|
|
137
|
+
area?: string;
|
|
158
138
|
/**
|
|
159
139
|
* The value content (can be text, links, badges, etc.)
|
|
160
140
|
*/
|
|
@@ -163,10 +143,20 @@ export declare interface AttributeListItemProps extends HTMLAttributes<HTMLDivEl
|
|
|
163
143
|
|
|
164
144
|
export declare interface AttributeListProps extends HTMLAttributes<HTMLDListElement> {
|
|
165
145
|
/**
|
|
166
|
-
*
|
|
167
|
-
* @default '
|
|
146
|
+
* Layout mode: stacked (default) or tabular
|
|
147
|
+
* @default 'stacked'
|
|
168
148
|
*/
|
|
169
|
-
|
|
149
|
+
layout?: AttributeList_2.Layout;
|
|
150
|
+
/**
|
|
151
|
+
* CSS grid-template-columns: e.g. "1fr 1fr 1fr", "200px 1fr"
|
|
152
|
+
* @default 'repeat(3, 1fr)'
|
|
153
|
+
*/
|
|
154
|
+
columns?: string;
|
|
155
|
+
/**
|
|
156
|
+
* Gap between items: number (in px) or CSS string value
|
|
157
|
+
* @default spacing-3 (12px)
|
|
158
|
+
*/
|
|
159
|
+
gap?: number | string;
|
|
170
160
|
/**
|
|
171
161
|
* AttributeList.Item components
|
|
172
162
|
*/
|
|
@@ -546,6 +536,74 @@ export declare interface DrawerRootProps extends Omit<DialogHTMLAttributes<HTMLD
|
|
|
546
536
|
children?: ReactNode;
|
|
547
537
|
}
|
|
548
538
|
|
|
539
|
+
export declare namespace Features {
|
|
540
|
+
export type Props = FeaturesProps;
|
|
541
|
+
export type ItemProps = FeaturesItemProps;
|
|
542
|
+
export type Direction = FeaturesDirection;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
export declare const Features: FeaturesComponent;
|
|
546
|
+
|
|
547
|
+
declare interface FeaturesComponent extends default_2.ForwardRefExoticComponent<FeaturesProps & default_2.RefAttributes<HTMLUListElement>> {
|
|
548
|
+
Item: typeof FeaturesItem;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
export declare type FeaturesDirection = "row" | "column";
|
|
552
|
+
|
|
553
|
+
declare const FeaturesItem: ForwardRefExoticComponent<FeaturesItemProps & RefAttributes<HTMLLIElement>>;
|
|
554
|
+
|
|
555
|
+
export declare interface FeaturesItemProps extends HTMLAttributes<HTMLLIElement> {
|
|
556
|
+
/** Icon node rendered on the left side of the item content */
|
|
557
|
+
icon?: ReactNode;
|
|
558
|
+
children?: ReactNode;
|
|
559
|
+
/**
|
|
560
|
+
* Native accessible label for the item.
|
|
561
|
+
* When provided, also renders a Tooltip on hover showing this text.
|
|
562
|
+
*/
|
|
563
|
+
"aria-label"?: string;
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
export declare interface FeaturesProps extends HTMLAttributes<HTMLUListElement> {
|
|
567
|
+
/** Flex direction of the feature list. Default: "column" */
|
|
568
|
+
direction?: FeaturesDirection;
|
|
569
|
+
children?: ReactNode;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
export declare const FormGroup: FormGroupComponent;
|
|
573
|
+
|
|
574
|
+
/**
|
|
575
|
+
* FormGroup Compound Component
|
|
576
|
+
*/
|
|
577
|
+
declare interface FormGroupComponent extends React.ForwardRefExoticComponent<FormGroupProps & React.RefAttributes<HTMLFormElement>> {
|
|
578
|
+
Field: typeof FormGroupField;
|
|
579
|
+
Separator: typeof FormGroupSeparator;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
/**
|
|
583
|
+
* FormGroup.Field - A grid item container for form controls
|
|
584
|
+
*/
|
|
585
|
+
declare const FormGroupField: ForwardRefExoticComponent<FormGroupFieldProps & RefAttributes<HTMLDivElement>>;
|
|
586
|
+
|
|
587
|
+
export declare interface FormGroupFieldProps extends HTMLAttributes<HTMLDivElement> {
|
|
588
|
+
/** CSS grid-column value, e.g. "span 2", "1 / 4" */
|
|
589
|
+
area?: string;
|
|
590
|
+
children?: ReactNode;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
export declare interface FormGroupProps extends FormHTMLAttributes<HTMLFormElement> {
|
|
594
|
+
/** CSS grid-template-columns value, e.g. "repeat(3, 1fr)". Default: "1fr" */
|
|
595
|
+
columns?: string;
|
|
596
|
+
children?: ReactNode;
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
/**
|
|
600
|
+
* FormGroup.Separator - A full-width horizontal separator
|
|
601
|
+
*/
|
|
602
|
+
declare const FormGroupSeparator: ForwardRefExoticComponent<FormGroupSeparatorProps & RefAttributes<HTMLHRElement>>;
|
|
603
|
+
|
|
604
|
+
export declare interface FormGroupSeparatorProps extends HTMLAttributes<HTMLHRElement> {
|
|
605
|
+
}
|
|
606
|
+
|
|
549
607
|
/**
|
|
550
608
|
* Helper function to get attributes for tabpanel elements
|
|
551
609
|
*
|
|
@@ -561,6 +619,12 @@ export declare interface DrawerRootProps extends Omit<DialogHTMLAttributes<HTMLD
|
|
|
561
619
|
*/
|
|
562
620
|
declare function getPanelAttribute(value: string): TabsPanelAttributes;
|
|
563
621
|
|
|
622
|
+
declare type IconProps = Omit<SVGProps<SVGSVGElement>, "ref"> & {
|
|
623
|
+
as: ComponentType<SVGProps<SVGSVGElement>>;
|
|
624
|
+
intent?: Icon.Intent | "inherit";
|
|
625
|
+
size?: Icon.Size | "inherit";
|
|
626
|
+
};
|
|
627
|
+
|
|
564
628
|
export declare namespace Menu {
|
|
565
629
|
export type Placement = MenuPlacement;
|
|
566
630
|
export type DataAttrs = Menu_2.DataAttrs;
|
|
@@ -1076,65 +1140,73 @@ declare interface SidebarType extends ForwardRefExoticComponent<SidebarRootProps
|
|
|
1076
1140
|
}
|
|
1077
1141
|
|
|
1078
1142
|
export declare const Table: React.ForwardRefExoticComponent<TableWrapperProps & React.RefAttributes<HTMLDivElement>> & {
|
|
1143
|
+
Toolbar: typeof TableToolbar;
|
|
1079
1144
|
Header: typeof TableHeader;
|
|
1080
1145
|
Body: typeof TableBody;
|
|
1081
1146
|
Footer: typeof TableFooter;
|
|
1082
1147
|
Row: typeof TableRow;
|
|
1083
|
-
|
|
1084
|
-
BodyCell: typeof TableBodyCell;
|
|
1148
|
+
Col: typeof TableCol;
|
|
1085
1149
|
Checkbox: typeof TableCheckbox;
|
|
1086
1150
|
DoubleLine: typeof TableDoubleLine;
|
|
1087
1151
|
Action: typeof TableAction;
|
|
1152
|
+
ActionItem: typeof TableActionItem;
|
|
1088
1153
|
};
|
|
1089
1154
|
|
|
1090
1155
|
/**
|
|
1091
|
-
* TableAction -
|
|
1156
|
+
* TableAction - Action trigger using Menu dropdown with action items
|
|
1092
1157
|
*/
|
|
1093
|
-
declare const TableAction: ForwardRefExoticComponent<TableActionProps & RefAttributes<
|
|
1158
|
+
declare const TableAction: ForwardRefExoticComponent<TableActionProps & RefAttributes<HTMLDivElement>>;
|
|
1094
1159
|
|
|
1095
1160
|
/**
|
|
1096
|
-
*
|
|
1161
|
+
* TableActionItem - Menu-based action item (uses Menu.Item internally)
|
|
1097
1162
|
*/
|
|
1098
|
-
|
|
1163
|
+
declare const TableActionItem: ForwardRefExoticComponent<MenuItemProps & RefAttributes<HTMLButtonElement>>;
|
|
1164
|
+
|
|
1165
|
+
/**
|
|
1166
|
+
* Table.ActionItem - clickable menu item within Table.Action dropdown
|
|
1167
|
+
*/
|
|
1168
|
+
export declare interface TableActionItemProps extends HTMLAttributes<HTMLButtonElement> {
|
|
1099
1169
|
/**
|
|
1100
|
-
* Callback when
|
|
1170
|
+
* Callback when item is clicked
|
|
1101
1171
|
*/
|
|
1102
|
-
onClick?: () => void;
|
|
1172
|
+
onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
1103
1173
|
/**
|
|
1104
|
-
* Disable the
|
|
1174
|
+
* Disable the item
|
|
1105
1175
|
*/
|
|
1106
1176
|
disabled?: boolean;
|
|
1107
1177
|
}
|
|
1108
1178
|
|
|
1109
1179
|
/**
|
|
1110
|
-
*
|
|
1180
|
+
* Table.Action - action trigger with Tooltip dropdown
|
|
1111
1181
|
*/
|
|
1112
|
-
declare
|
|
1182
|
+
export declare interface TableActionProps {
|
|
1183
|
+
/**
|
|
1184
|
+
* Icon element to render in the trigger button
|
|
1185
|
+
*/
|
|
1186
|
+
icon: IconProps["as"];
|
|
1187
|
+
/**
|
|
1188
|
+
* Tooltip content: Table.ActionItem elements
|
|
1189
|
+
*/
|
|
1190
|
+
children: ReactNode;
|
|
1191
|
+
}
|
|
1113
1192
|
|
|
1114
1193
|
/**
|
|
1115
|
-
*
|
|
1194
|
+
* TableBody - container for data rows
|
|
1116
1195
|
*/
|
|
1117
|
-
declare const
|
|
1118
|
-
variant?: TableCellVariant;
|
|
1119
|
-
} & RefAttributes<HTMLTableCellElement>>;
|
|
1196
|
+
declare const TableBody: ForwardRefExoticComponent<TableBodyProps & RefAttributes<HTMLDivElement>>;
|
|
1120
1197
|
|
|
1121
1198
|
/**
|
|
1122
|
-
* Table
|
|
1123
|
-
* Default vertical centering for content
|
|
1199
|
+
* Table.Body - container for data rows
|
|
1124
1200
|
*/
|
|
1125
|
-
export declare type
|
|
1126
|
-
variant?: TableCellVariant;
|
|
1127
|
-
};
|
|
1128
|
-
|
|
1129
|
-
export declare type TableBodyProps = HTMLAttributes<HTMLTableSectionElement>;
|
|
1201
|
+
export declare type TableBodyProps = HTMLAttributes<HTMLDivElement>;
|
|
1130
1202
|
|
|
1131
1203
|
/**
|
|
1132
|
-
* TableCheckbox - Built-in checkbox for row
|
|
1204
|
+
* TableCheckbox - Built-in checkbox for row selection
|
|
1133
1205
|
*/
|
|
1134
1206
|
declare const TableCheckbox: ForwardRefExoticComponent<TableCheckboxProps & RefAttributes<HTMLInputElement>>;
|
|
1135
1207
|
|
|
1136
1208
|
/**
|
|
1137
|
-
*
|
|
1209
|
+
* Table.Checkbox - built-in checkbox for row selection
|
|
1138
1210
|
*/
|
|
1139
1211
|
export declare interface TableCheckboxProps {
|
|
1140
1212
|
/**
|
|
@@ -1142,7 +1214,7 @@ export declare interface TableCheckboxProps {
|
|
|
1142
1214
|
*/
|
|
1143
1215
|
rowId: string | number;
|
|
1144
1216
|
/**
|
|
1145
|
-
* Whether checkbox is checked
|
|
1217
|
+
* Whether checkbox is checked (optional - managed by Table context)
|
|
1146
1218
|
*/
|
|
1147
1219
|
checked?: boolean;
|
|
1148
1220
|
/**
|
|
@@ -1150,20 +1222,53 @@ export declare interface TableCheckboxProps {
|
|
|
1150
1222
|
*/
|
|
1151
1223
|
indeterminate?: boolean;
|
|
1152
1224
|
/**
|
|
1153
|
-
* Callback when checkbox state changes
|
|
1225
|
+
* Callback when checkbox state changes (optional - managed by Table context)
|
|
1154
1226
|
*/
|
|
1155
|
-
onChange
|
|
1227
|
+
onChange?: (checked: boolean) => void;
|
|
1156
1228
|
}
|
|
1157
1229
|
|
|
1158
1230
|
/**
|
|
1159
|
-
*
|
|
1231
|
+
* TableCol - polymorphic cell with grid area support
|
|
1232
|
+
*/
|
|
1233
|
+
declare const TableCol: ForwardRefExoticComponent<HTMLAttributes<any> & {
|
|
1234
|
+
as?: "th" | "td" | "div";
|
|
1235
|
+
area?: string;
|
|
1236
|
+
variant?: TableCellVariant;
|
|
1237
|
+
} & RefAttributes<any>>;
|
|
1238
|
+
|
|
1239
|
+
/**
|
|
1240
|
+
* Table.Col - polymorphic cell with grid area support
|
|
1241
|
+
*/
|
|
1242
|
+
export declare type TableColProps = HTMLAttributes<any> & {
|
|
1243
|
+
/**
|
|
1244
|
+
* HTML element type: 'th' for headers, 'td' for data cells, 'div' for generic
|
|
1245
|
+
* @default 'div'
|
|
1246
|
+
*/
|
|
1247
|
+
as?: "th" | "td" | "div";
|
|
1248
|
+
/**
|
|
1249
|
+
* CSS grid area (e.g., "span 2", "1 / 3")
|
|
1250
|
+
*/
|
|
1251
|
+
area?: string;
|
|
1252
|
+
/**
|
|
1253
|
+
* Cell variant for styling
|
|
1254
|
+
*/
|
|
1255
|
+
variant?: TableCellVariant;
|
|
1256
|
+
};
|
|
1257
|
+
|
|
1258
|
+
/**
|
|
1259
|
+
* TableDoubleLine - Built-in cell with title and subtitle using typography tokens
|
|
1160
1260
|
*/
|
|
1161
|
-
declare const TableDoubleLine: ForwardRefExoticComponent<TableDoubleLineProps & RefAttributes<
|
|
1261
|
+
declare const TableDoubleLine: ForwardRefExoticComponent<TableDoubleLineProps & RefAttributes<any>>;
|
|
1162
1262
|
|
|
1163
1263
|
/**
|
|
1164
|
-
*
|
|
1264
|
+
* Table.DoubleLine - built-in cell with title and subtitle
|
|
1165
1265
|
*/
|
|
1166
|
-
export declare interface TableDoubleLineProps extends Omit<HTMLAttributes<
|
|
1266
|
+
export declare interface TableDoubleLineProps extends Omit<HTMLAttributes<any>, "title"> {
|
|
1267
|
+
/**
|
|
1268
|
+
* HTML element type: 'th' for headers, 'td' for data cells, 'div' for generic
|
|
1269
|
+
* @default 'div'
|
|
1270
|
+
*/
|
|
1271
|
+
as?: "th" | "td" | "div";
|
|
1167
1272
|
/**
|
|
1168
1273
|
* Main title (bold, primary color)
|
|
1169
1274
|
*/
|
|
@@ -1180,66 +1285,71 @@ export declare interface TableDoubleLineProps extends Omit<HTMLAttributes<HTMLDi
|
|
|
1180
1285
|
}
|
|
1181
1286
|
|
|
1182
1287
|
/**
|
|
1183
|
-
* TableFooter -
|
|
1288
|
+
* TableFooter - container for footer row(s)
|
|
1184
1289
|
*/
|
|
1185
|
-
declare const TableFooter: ForwardRefExoticComponent<TableFooterProps & RefAttributes<
|
|
1290
|
+
declare const TableFooter: ForwardRefExoticComponent<TableFooterProps & RefAttributes<HTMLDivElement>>;
|
|
1186
1291
|
|
|
1187
|
-
|
|
1292
|
+
/**
|
|
1293
|
+
* Table.Footer - container for footer row(s)
|
|
1294
|
+
*/
|
|
1295
|
+
export declare type TableFooterProps = HTMLAttributes<HTMLDivElement>;
|
|
1188
1296
|
|
|
1189
1297
|
/**
|
|
1190
|
-
* TableHeader -
|
|
1298
|
+
* TableHeader - container for header columns
|
|
1191
1299
|
*/
|
|
1192
|
-
declare const TableHeader: ForwardRefExoticComponent<TableHeaderProps & RefAttributes<
|
|
1300
|
+
declare const TableHeader: ForwardRefExoticComponent<TableHeaderProps & RefAttributes<HTMLDivElement>>;
|
|
1193
1301
|
|
|
1194
1302
|
/**
|
|
1195
|
-
*
|
|
1303
|
+
* Table.Header - container for header columns
|
|
1196
1304
|
*/
|
|
1197
|
-
declare
|
|
1198
|
-
sortable?: boolean;
|
|
1199
|
-
sortDirection?: "asc" | "desc" | null;
|
|
1200
|
-
onSort?: (direction: "asc" | "desc" | null) => void;
|
|
1201
|
-
} & RefAttributes<HTMLTableCellElement>>;
|
|
1305
|
+
export declare type TableHeaderProps = HTMLAttributes<HTMLDivElement>;
|
|
1202
1306
|
|
|
1203
1307
|
/**
|
|
1204
|
-
*
|
|
1205
|
-
* Supports sortable headers with controlled sort direction
|
|
1308
|
+
* TableRow - wrapper for cells
|
|
1206
1309
|
*/
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
* Current sort direction ('asc' | 'desc' | null for no sort, chevron always visible when sortable)
|
|
1214
|
-
*/
|
|
1215
|
-
sortDirection?: "asc" | "desc" | null;
|
|
1216
|
-
/**
|
|
1217
|
-
* Callback when user clicks sortable header
|
|
1218
|
-
*/
|
|
1219
|
-
onSort?: (direction: "asc" | "desc" | null) => void;
|
|
1220
|
-
};
|
|
1310
|
+
declare const TableRow: ForwardRefExoticComponent<TableRowProps & RefAttributes<HTMLDivElement>>;
|
|
1311
|
+
|
|
1312
|
+
/**
|
|
1313
|
+
* Table.Row - wrapper for cells
|
|
1314
|
+
*/
|
|
1315
|
+
export declare type TableRowProps = HTMLAttributes<HTMLDivElement>;
|
|
1221
1316
|
|
|
1222
|
-
|
|
1317
|
+
/**
|
|
1318
|
+
* Selection state data passed to toolbar render function
|
|
1319
|
+
*/
|
|
1320
|
+
declare interface TableSelectionData {
|
|
1321
|
+
selected: Set<string | number>;
|
|
1322
|
+
allSelected: boolean;
|
|
1323
|
+
someSelected: boolean;
|
|
1324
|
+
}
|
|
1223
1325
|
|
|
1224
1326
|
/**
|
|
1225
|
-
*
|
|
1327
|
+
* TableToolbar - renders toolbar content with optional render function receiving selected row IDs
|
|
1226
1328
|
*/
|
|
1227
|
-
declare const
|
|
1329
|
+
declare const TableToolbar: ForwardRefExoticComponent<TableToolbarProps & RefAttributes<HTMLDivElement>>;
|
|
1228
1330
|
|
|
1229
|
-
|
|
1331
|
+
/**
|
|
1332
|
+
* Table.Toolbar - generic slot for action controls with optional render function
|
|
1333
|
+
*/
|
|
1334
|
+
export declare interface TableToolbarProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
|
|
1335
|
+
/**
|
|
1336
|
+
* Render function receives selected row IDs Set, or regular children
|
|
1337
|
+
*/
|
|
1338
|
+
children?: ReactNode | ((selectedIds: Set<string | number>) => ReactNode);
|
|
1339
|
+
}
|
|
1230
1340
|
|
|
1231
1341
|
/**
|
|
1232
|
-
* Table wrapper
|
|
1342
|
+
* Table root wrapper with CSS Grid column definition
|
|
1233
1343
|
*/
|
|
1234
1344
|
export declare type TableWrapperProps = HTMLAttributes<HTMLDivElement> & {
|
|
1235
1345
|
/**
|
|
1236
|
-
* CSS Grid template columns string (e.g., "2fr 1fr 1fr
|
|
1346
|
+
* CSS Grid template columns string (e.g., "repeat(3, 1fr)", "2fr 1fr 1fr")
|
|
1237
1347
|
*/
|
|
1238
|
-
columns
|
|
1348
|
+
columns?: string;
|
|
1239
1349
|
/**
|
|
1240
|
-
*
|
|
1350
|
+
* Callback fired when row selection changes
|
|
1241
1351
|
*/
|
|
1242
|
-
|
|
1352
|
+
onSelectionChange?: (data: TableSelectionData) => void;
|
|
1243
1353
|
};
|
|
1244
1354
|
|
|
1245
1355
|
export declare const Tabs: TabsComponent;
|