@brycks/core-front 0.12.0 → 0.12.1
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/components/data.d.ts +387 -2
- package/dist/components/feedback.d.ts +317 -2
- package/dist/components/form.d.ts +889 -2
- package/dist/components/layout.d.ts +587 -2
- package/dist/components/media/Video/Video.cjs +1 -1
- package/dist/components/media/Video/Video.cjs.map +1 -1
- package/dist/components/media/Video/Video.js +54 -54
- package/dist/components/media/Video/Video.js.map +1 -1
- package/dist/components/navigation.d.ts +436 -2
- package/dist/components/utility.d.ts +278 -2
- package/dist/styles.css +1 -1
- package/package.json +22 -21
- package/dist/data.d.ts +0 -387
- package/dist/feedback.d.ts +0 -317
- package/dist/form.d.ts +0 -889
- package/dist/layout.d.ts +0 -587
- package/dist/navigation.d.ts +0 -436
- package/dist/utility.d.ts +0 -278
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brycks/core-front",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.1",
|
|
4
4
|
"description": "Brycks Design System - A modern, calm, and tactile UI component library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -8,54 +8,54 @@
|
|
|
8
8
|
"types": "./dist/index.d.ts",
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
11
12
|
"import": "./dist/index.js",
|
|
12
|
-
"require": "./dist/index.cjs"
|
|
13
|
-
"types": "./dist/index.d.ts"
|
|
13
|
+
"require": "./dist/index.cjs"
|
|
14
14
|
},
|
|
15
15
|
"./tokens": {
|
|
16
|
+
"types": "./dist/tokens.d.ts",
|
|
16
17
|
"import": "./dist/tokens.js",
|
|
17
|
-
"require": "./dist/tokens.cjs"
|
|
18
|
-
"types": "./dist/tokens.d.ts"
|
|
18
|
+
"require": "./dist/tokens.cjs"
|
|
19
19
|
},
|
|
20
20
|
"./themes": {
|
|
21
|
+
"types": "./dist/themes.d.ts",
|
|
21
22
|
"import": "./dist/themes.js",
|
|
22
|
-
"require": "./dist/themes.cjs"
|
|
23
|
-
"types": "./dist/themes.d.ts"
|
|
23
|
+
"require": "./dist/themes.cjs"
|
|
24
24
|
},
|
|
25
25
|
"./hooks": {
|
|
26
|
+
"types": "./dist/hooks.d.ts",
|
|
26
27
|
"import": "./dist/hooks.js",
|
|
27
|
-
"require": "./dist/hooks.cjs"
|
|
28
|
-
"types": "./dist/hooks.d.ts"
|
|
28
|
+
"require": "./dist/hooks.cjs"
|
|
29
29
|
},
|
|
30
30
|
"./components/layout": {
|
|
31
|
+
"types": "./dist/components/layout.d.ts",
|
|
31
32
|
"import": "./dist/components/layout.js",
|
|
32
|
-
"require": "./dist/components/layout.cjs"
|
|
33
|
-
"types": "./dist/components/layout.d.ts"
|
|
33
|
+
"require": "./dist/components/layout.cjs"
|
|
34
34
|
},
|
|
35
35
|
"./components/form": {
|
|
36
|
+
"types": "./dist/components/form.d.ts",
|
|
36
37
|
"import": "./dist/components/form.js",
|
|
37
|
-
"require": "./dist/components/form.cjs"
|
|
38
|
-
"types": "./dist/components/form.d.ts"
|
|
38
|
+
"require": "./dist/components/form.cjs"
|
|
39
39
|
},
|
|
40
40
|
"./components/feedback": {
|
|
41
|
+
"types": "./dist/components/feedback.d.ts",
|
|
41
42
|
"import": "./dist/components/feedback.js",
|
|
42
|
-
"require": "./dist/components/feedback.cjs"
|
|
43
|
-
"types": "./dist/components/feedback.d.ts"
|
|
43
|
+
"require": "./dist/components/feedback.cjs"
|
|
44
44
|
},
|
|
45
45
|
"./components/navigation": {
|
|
46
|
+
"types": "./dist/components/navigation.d.ts",
|
|
46
47
|
"import": "./dist/components/navigation.js",
|
|
47
|
-
"require": "./dist/components/navigation.cjs"
|
|
48
|
-
"types": "./dist/components/navigation.d.ts"
|
|
48
|
+
"require": "./dist/components/navigation.cjs"
|
|
49
49
|
},
|
|
50
50
|
"./components/data": {
|
|
51
|
+
"types": "./dist/components/data.d.ts",
|
|
51
52
|
"import": "./dist/components/data.js",
|
|
52
|
-
"require": "./dist/components/data.cjs"
|
|
53
|
-
"types": "./dist/components/data.d.ts"
|
|
53
|
+
"require": "./dist/components/data.cjs"
|
|
54
54
|
},
|
|
55
55
|
"./components/utility": {
|
|
56
|
+
"types": "./dist/components/utility.d.ts",
|
|
56
57
|
"import": "./dist/components/utility.js",
|
|
57
|
-
"require": "./dist/components/utility.cjs"
|
|
58
|
-
"types": "./dist/components/utility.d.ts"
|
|
58
|
+
"require": "./dist/components/utility.cjs"
|
|
59
59
|
},
|
|
60
60
|
"./styles.css": "./dist/styles.css"
|
|
61
61
|
},
|
|
@@ -80,6 +80,7 @@
|
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
82
|
"@eslint/js": "^9.18.0",
|
|
83
|
+
"@microsoft/api-extractor": "^7.58.12",
|
|
83
84
|
"@types/node": "^25.0.9",
|
|
84
85
|
"@types/react": "^19.2.5",
|
|
85
86
|
"@types/react-dom": "^19.2.3",
|
package/dist/data.d.ts
DELETED
|
@@ -1,387 +0,0 @@
|
|
|
1
|
-
import { CSSProperties } from 'react';
|
|
2
|
-
import { ForwardRefExoticComponent } from 'react';
|
|
3
|
-
import { HTMLAttributes } from 'react';
|
|
4
|
-
import { JSX } from 'react/jsx-runtime';
|
|
5
|
-
import { ReactNode } from 'react';
|
|
6
|
-
import { RefAttributes } from 'react';
|
|
7
|
-
import { TdHTMLAttributes } from 'react';
|
|
8
|
-
import { ThHTMLAttributes } from 'react';
|
|
9
|
-
|
|
10
|
-
export declare const InfoItem: ForwardRefExoticComponent<InfoItemProps & RefAttributes<HTMLDivElement>>;
|
|
11
|
-
|
|
12
|
-
export declare type InfoItemLayout = 'vertical' | 'horizontal' | 'inline';
|
|
13
|
-
|
|
14
|
-
export declare interface InfoItemProps extends HTMLAttributes<HTMLDivElement> {
|
|
15
|
-
/** Label text */
|
|
16
|
-
label: ReactNode;
|
|
17
|
-
/** Value to display */
|
|
18
|
-
value?: ReactNode;
|
|
19
|
-
/** Children (alternative to value prop) */
|
|
20
|
-
children?: ReactNode;
|
|
21
|
-
/** Layout direction */
|
|
22
|
-
layout?: InfoItemLayout;
|
|
23
|
-
/** Size variant */
|
|
24
|
-
size?: InfoItemSize;
|
|
25
|
-
/** Hide if value is empty */
|
|
26
|
-
hideEmpty?: boolean;
|
|
27
|
-
/** Custom label width (for horizontal layout) */
|
|
28
|
-
labelWidth?: string | number;
|
|
29
|
-
/** Custom class name */
|
|
30
|
-
className?: string;
|
|
31
|
-
/** Test ID */
|
|
32
|
-
testId?: string;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export declare type InfoItemSize = 'sm' | 'md' | 'lg';
|
|
36
|
-
|
|
37
|
-
export declare const InfoList: ForwardRefExoticComponent<InfoListProps & RefAttributes<HTMLDListElement>>;
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* InfoList Component
|
|
41
|
-
*
|
|
42
|
-
* A container for multiple InfoItem components.
|
|
43
|
-
* Provides consistent spacing and layout for info items.
|
|
44
|
-
*/
|
|
45
|
-
export declare interface InfoListProps extends HTMLAttributes<HTMLDListElement> {
|
|
46
|
-
/** Gap between items */
|
|
47
|
-
gap?: 'sm' | 'md' | 'lg';
|
|
48
|
-
/** Number of columns */
|
|
49
|
-
columns?: 1 | 2 | 3 | 4;
|
|
50
|
-
/** Children (InfoItem components) */
|
|
51
|
-
children: ReactNode;
|
|
52
|
-
/** Custom class name */
|
|
53
|
-
className?: string;
|
|
54
|
-
/** Test ID */
|
|
55
|
-
testId?: string;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export declare const List: ForwardRefExoticComponent<ListProps & RefAttributes<HTMLUListElement>>;
|
|
59
|
-
|
|
60
|
-
export declare const ListDivider: ForwardRefExoticComponent<ListDividerProps & RefAttributes<HTMLLIElement>>;
|
|
61
|
-
|
|
62
|
-
export declare interface ListDividerProps extends HTMLAttributes<HTMLLIElement> {
|
|
63
|
-
/** Custom class name */
|
|
64
|
-
className?: string;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export declare const ListHeader: ForwardRefExoticComponent<ListHeaderProps & RefAttributes<HTMLLIElement>>;
|
|
68
|
-
|
|
69
|
-
export declare interface ListHeaderProps extends HTMLAttributes<HTMLLIElement> {
|
|
70
|
-
/** Custom class name */
|
|
71
|
-
className?: string;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export declare const ListItem: ForwardRefExoticComponent<ListItemProps & RefAttributes<HTMLLIElement>>;
|
|
75
|
-
|
|
76
|
-
export declare interface ListItemProps extends HTMLAttributes<HTMLLIElement> {
|
|
77
|
-
/** Icon or avatar on the left */
|
|
78
|
-
leftElement?: ReactNode;
|
|
79
|
-
/** Element on the right (badge, button, etc.) */
|
|
80
|
-
rightElement?: ReactNode;
|
|
81
|
-
/** Secondary text below the main content */
|
|
82
|
-
secondary?: ReactNode;
|
|
83
|
-
/** Whether the item is selected */
|
|
84
|
-
selected?: boolean;
|
|
85
|
-
/** Whether the item is disabled */
|
|
86
|
-
disabled?: boolean;
|
|
87
|
-
/** Whether the item is clickable */
|
|
88
|
-
clickable?: boolean;
|
|
89
|
-
/** Custom class name */
|
|
90
|
-
className?: string;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export declare interface ListProps extends HTMLAttributes<HTMLUListElement> {
|
|
94
|
-
/** List size */
|
|
95
|
-
size?: ListSize;
|
|
96
|
-
/** List variant */
|
|
97
|
-
variant?: ListVariant;
|
|
98
|
-
/** Whether list items are interactive */
|
|
99
|
-
interactive?: boolean;
|
|
100
|
-
/** Custom class name */
|
|
101
|
-
className?: string;
|
|
102
|
-
/** Test ID */
|
|
103
|
-
testId?: string;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
export declare type ListSize = 'sm' | 'md' | 'lg';
|
|
107
|
-
|
|
108
|
-
export declare type ListVariant = 'default' | 'bordered' | 'separated';
|
|
109
|
-
|
|
110
|
-
export declare const PieChart: ForwardRefExoticComponent<PieChartProps & RefAttributes<HTMLDivElement>>;
|
|
111
|
-
|
|
112
|
-
export declare type PieChartLegend = 'right' | 'bottom' | 'none';
|
|
113
|
-
|
|
114
|
-
export declare interface PieChartProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onSelect'> {
|
|
115
|
-
/** Fatias do gráfico */
|
|
116
|
-
data: PieSlice[];
|
|
117
|
-
/** Diâmetro do gráfico em px */
|
|
118
|
-
size?: number;
|
|
119
|
-
/** Espessura do anel em px. `0` = pizza cheia; padrão = rosca */
|
|
120
|
-
thickness?: number;
|
|
121
|
-
/** Posição da legenda */
|
|
122
|
-
legend?: PieChartLegend;
|
|
123
|
-
/** Rótulo no centro da rosca (ignorado quando `thickness = 0`) */
|
|
124
|
-
centerLabel?: ReactNode;
|
|
125
|
-
/** Conteúdo central; por padrão, a soma dos valores */
|
|
126
|
-
centerValue?: ReactNode;
|
|
127
|
-
/** Formata valores na legenda, no centro e no resumo acessível */
|
|
128
|
-
valueFormatter?: (value: number) => string;
|
|
129
|
-
/** Exibe a participação percentual de cada fatia na legenda */
|
|
130
|
-
showShare?: boolean;
|
|
131
|
-
/** Texto quando não há dado positivo */
|
|
132
|
-
emptyText?: string;
|
|
133
|
-
/** Custom class name */
|
|
134
|
-
className?: string;
|
|
135
|
-
/** Test ID */
|
|
136
|
-
testId?: string;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
export declare interface PieSlice {
|
|
140
|
-
/** Chave estável da fatia */
|
|
141
|
-
id: string;
|
|
142
|
-
/** Rótulo legível (aparece na legenda e no leitor de tela) */
|
|
143
|
-
label: string;
|
|
144
|
-
/** Valor absoluto — negativos são ignorados */
|
|
145
|
-
value: number;
|
|
146
|
-
/** Cor da fatia; use um token (`var(--brycks-*)`). Sem cor, entra na paleta padrão. */
|
|
147
|
-
color?: string;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
export declare const Table: ForwardRefExoticComponent<TableProps & RefAttributes<HTMLTableElement>>;
|
|
151
|
-
|
|
152
|
-
export declare const TableBody: ForwardRefExoticComponent<TableBodyProps & RefAttributes<HTMLTableSectionElement>>;
|
|
153
|
-
|
|
154
|
-
export declare interface TableBodyProps extends HTMLAttributes<HTMLTableSectionElement> {
|
|
155
|
-
/** Custom class name */
|
|
156
|
-
className?: string;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
export declare const TableCaption: ForwardRefExoticComponent<TableCaptionProps & RefAttributes<HTMLTableCaptionElement>>;
|
|
160
|
-
|
|
161
|
-
export declare interface TableCaptionProps extends HTMLAttributes<HTMLTableCaptionElement> {
|
|
162
|
-
/** Caption placement */
|
|
163
|
-
placement?: 'top' | 'bottom';
|
|
164
|
-
/** Custom class name */
|
|
165
|
-
className?: string;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
export declare const TableCell: ForwardRefExoticComponent<TableCellProps & RefAttributes<HTMLTableCellElement>>;
|
|
169
|
-
|
|
170
|
-
export declare interface TableCellProps extends TdHTMLAttributes<HTMLTableCellElement> {
|
|
171
|
-
/** Text alignment */
|
|
172
|
-
align?: 'left' | 'center' | 'right';
|
|
173
|
-
/** Whether to truncate text */
|
|
174
|
-
truncate?: boolean;
|
|
175
|
-
/** Custom class name */
|
|
176
|
-
className?: string;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
export declare const TableEmpty: ForwardRefExoticComponent<TableEmptyProps & RefAttributes<HTMLTableRowElement>>;
|
|
180
|
-
|
|
181
|
-
export declare interface TableEmptyProps {
|
|
182
|
-
/** Number of columns to span (match the table's column count) */
|
|
183
|
-
colSpan: number;
|
|
184
|
-
/** Icon or illustration */
|
|
185
|
-
icon?: ReactNode;
|
|
186
|
-
/** Title text */
|
|
187
|
-
title?: ReactNode;
|
|
188
|
-
/** Description text */
|
|
189
|
-
description?: ReactNode;
|
|
190
|
-
/** Action element (button, link) */
|
|
191
|
-
action?: ReactNode;
|
|
192
|
-
/** Custom class name */
|
|
193
|
-
className?: string;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
export declare const TableFoot: ForwardRefExoticComponent<TableFootProps & RefAttributes<HTMLTableSectionElement>>;
|
|
197
|
-
|
|
198
|
-
export declare interface TableFootProps extends HTMLAttributes<HTMLTableSectionElement> {
|
|
199
|
-
/** Custom class name */
|
|
200
|
-
className?: string;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
export declare const TableHead: ForwardRefExoticComponent<TableHeadProps & RefAttributes<HTMLTableSectionElement>>;
|
|
204
|
-
|
|
205
|
-
export declare const TableHeader: ForwardRefExoticComponent<TableHeaderProps & RefAttributes<HTMLTableCellElement>>;
|
|
206
|
-
|
|
207
|
-
export declare interface TableHeaderProps extends ThHTMLAttributes<HTMLTableCellElement> {
|
|
208
|
-
/** Whether the column is sortable */
|
|
209
|
-
sortable?: boolean;
|
|
210
|
-
/** Sort direction */
|
|
211
|
-
sortDirection?: 'asc' | 'desc' | null;
|
|
212
|
-
/** Callback when sort is requested */
|
|
213
|
-
onSort?: () => void;
|
|
214
|
-
/** Text alignment */
|
|
215
|
-
align?: 'left' | 'center' | 'right';
|
|
216
|
-
/** Custom class name */
|
|
217
|
-
className?: string;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
export declare interface TableHeadProps extends HTMLAttributes<HTMLTableSectionElement> {
|
|
221
|
-
/** Whether the header is sticky */
|
|
222
|
-
sticky?: boolean;
|
|
223
|
-
/** Custom class name */
|
|
224
|
-
className?: string;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
export declare interface TableProps extends HTMLAttributes<HTMLTableElement> {
|
|
228
|
-
/** Table size */
|
|
229
|
-
size?: TableSize;
|
|
230
|
-
/** Table variant */
|
|
231
|
-
variant?: TableVariant;
|
|
232
|
-
/** Whether the table has a sticky header */
|
|
233
|
-
stickyHeader?: boolean;
|
|
234
|
-
/** Whether the table is in a loading state */
|
|
235
|
-
loading?: boolean;
|
|
236
|
-
/** Custom class name */
|
|
237
|
-
className?: string;
|
|
238
|
-
/** Test ID */
|
|
239
|
-
testId?: string;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
export declare const TableRow: ForwardRefExoticComponent<TableRowProps & RefAttributes<HTMLTableRowElement>>;
|
|
243
|
-
|
|
244
|
-
export declare interface TableRowProps extends HTMLAttributes<HTMLTableRowElement> {
|
|
245
|
-
/** Whether the row is selected */
|
|
246
|
-
selected?: boolean;
|
|
247
|
-
/** Whether the row is clickable */
|
|
248
|
-
clickable?: boolean;
|
|
249
|
-
/** Custom class name */
|
|
250
|
-
className?: string;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
export declare type TableSize = 'sm' | 'md' | 'lg';
|
|
254
|
-
|
|
255
|
-
export declare function TableSkeleton({ rows, columns, className }: TableSkeletonProps): JSX.Element;
|
|
256
|
-
|
|
257
|
-
export declare namespace TableSkeleton {
|
|
258
|
-
var displayName: string;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
export declare interface TableSkeletonProps {
|
|
262
|
-
/** Number of skeleton rows */
|
|
263
|
-
rows?: number;
|
|
264
|
-
/** Number of columns per row (match the table's column count) */
|
|
265
|
-
columns: number;
|
|
266
|
-
/** Custom class name applied to each row */
|
|
267
|
-
className?: string;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
export declare type TableVariant = 'default' | 'bordered';
|
|
271
|
-
|
|
272
|
-
export declare interface TreeNode {
|
|
273
|
-
/** Unique identifier */
|
|
274
|
-
id: string;
|
|
275
|
-
/** Display label */
|
|
276
|
-
label: string;
|
|
277
|
-
/** Optional icon */
|
|
278
|
-
icon?: ReactNode;
|
|
279
|
-
/** Child nodes */
|
|
280
|
-
children?: TreeNode[];
|
|
281
|
-
/** Whether the node is disabled */
|
|
282
|
-
disabled?: boolean;
|
|
283
|
-
/** Additional data */
|
|
284
|
-
data?: unknown;
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
export declare const TreeView: ForwardRefExoticComponent<TreeViewProps & RefAttributes<HTMLUListElement>>;
|
|
288
|
-
|
|
289
|
-
export declare interface TreeViewProps {
|
|
290
|
-
/** Tree data */
|
|
291
|
-
data: TreeNode[];
|
|
292
|
-
/** Selected node IDs (controlled) */
|
|
293
|
-
selectedIds?: string[];
|
|
294
|
-
/** Default selected node IDs (uncontrolled) */
|
|
295
|
-
defaultSelectedIds?: string[];
|
|
296
|
-
/** Expanded node IDs (controlled) */
|
|
297
|
-
expandedIds?: string[];
|
|
298
|
-
/** Default expanded node IDs (uncontrolled) */
|
|
299
|
-
defaultExpandedIds?: string[];
|
|
300
|
-
/** Callback when selection changes */
|
|
301
|
-
onSelectionChange?: (selectedIds: string[]) => void;
|
|
302
|
-
/** Callback when expansion changes */
|
|
303
|
-
onExpansionChange?: (expandedIds: string[]) => void;
|
|
304
|
-
/** Callback when a node is clicked */
|
|
305
|
-
onNodeClick?: (node: TreeNode) => void;
|
|
306
|
-
/** Whether to allow multi-selection */
|
|
307
|
-
multiSelect?: boolean;
|
|
308
|
-
/** Component size */
|
|
309
|
-
size?: TreeViewSize;
|
|
310
|
-
/** Whether to show connecting lines */
|
|
311
|
-
showLines?: boolean;
|
|
312
|
-
/** Custom node renderer */
|
|
313
|
-
renderNode?: (node: TreeNode, isSelected: boolean, isExpanded: boolean) => ReactNode;
|
|
314
|
-
/** Label for accessibility */
|
|
315
|
-
'aria-label'?: string;
|
|
316
|
-
/** Custom class name */
|
|
317
|
-
className?: string;
|
|
318
|
-
/** Test ID */
|
|
319
|
-
testId?: string;
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
export declare type TreeViewSize = 'sm' | 'md' | 'lg';
|
|
323
|
-
|
|
324
|
-
export declare const VariableHeightVirtualList: <T>(props: VariableHeightVirtualListProps<T> & {
|
|
325
|
-
ref?: React.ForwardedRef<HTMLDivElement>;
|
|
326
|
-
}) => React.ReactElement;
|
|
327
|
-
|
|
328
|
-
export declare interface VariableHeightVirtualListProps<T> {
|
|
329
|
-
/** Array of items to render */
|
|
330
|
-
items: T[];
|
|
331
|
-
/** Function to estimate item height (used for initial layout) */
|
|
332
|
-
estimateItemHeight: (index: number) => number;
|
|
333
|
-
/** Visible height of the container */
|
|
334
|
-
height: number;
|
|
335
|
-
/** Optional width of the container */
|
|
336
|
-
width?: number | string;
|
|
337
|
-
/** Number of extra items to render above/below viewport */
|
|
338
|
-
overscan?: number;
|
|
339
|
-
/** Render function for each item */
|
|
340
|
-
renderItem: (item: T, index: number, measureRef: (el: HTMLElement | null) => void) => ReactNode;
|
|
341
|
-
/** Custom class name */
|
|
342
|
-
className?: string;
|
|
343
|
-
/** Test ID */
|
|
344
|
-
testId?: string;
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
export declare const VirtualList: <T>(props: VirtualListProps<T> & {
|
|
348
|
-
ref?: React.ForwardedRef<VirtualListHandle>;
|
|
349
|
-
}) => React.ReactElement;
|
|
350
|
-
|
|
351
|
-
export declare interface VirtualListHandle {
|
|
352
|
-
/** Scroll to a specific index */
|
|
353
|
-
scrollToIndex: (index: number, align?: 'start' | 'center' | 'end') => void;
|
|
354
|
-
/** Scroll to a specific offset */
|
|
355
|
-
scrollToOffset: (offset: number) => void;
|
|
356
|
-
/** Get current scroll position */
|
|
357
|
-
getScrollTop: () => number;
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
export declare interface VirtualListProps<T> {
|
|
361
|
-
/** Array of items to render */
|
|
362
|
-
items: T[];
|
|
363
|
-
/** Height of each item in pixels */
|
|
364
|
-
itemHeight: number;
|
|
365
|
-
/** Visible height of the container */
|
|
366
|
-
height: number;
|
|
367
|
-
/** Optional width of the container */
|
|
368
|
-
width?: number | string;
|
|
369
|
-
/** Number of extra items to render above/below viewport for smoother scrolling */
|
|
370
|
-
overscan?: number;
|
|
371
|
-
/** Render function for each item */
|
|
372
|
-
renderItem: (item: T, index: number, style: CSSProperties) => ReactNode;
|
|
373
|
-
/** Callback when scroll position changes */
|
|
374
|
-
onScroll?: (scrollTop: number) => void;
|
|
375
|
-
/** Callback when reaching the end of the list */
|
|
376
|
-
onEndReached?: () => void;
|
|
377
|
-
/** Threshold in pixels before end to trigger onEndReached */
|
|
378
|
-
endReachedThreshold?: number;
|
|
379
|
-
/** Initial scroll position */
|
|
380
|
-
initialScrollTop?: number;
|
|
381
|
-
/** Custom class name */
|
|
382
|
-
className?: string;
|
|
383
|
-
/** Test ID */
|
|
384
|
-
testId?: string;
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
export { }
|