@appforgeapps/uiforge 0.1.0
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/LICENSE +21 -0
- package/README.md +1241 -0
- package/dist/index.d.ts +847 -0
- package/dist/uiforge.cjs +6 -0
- package/dist/uiforge.css +1 -0
- package/dist/uiforge.js +1882 -0
- package/package.json +94 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,847 @@
|
|
|
1
|
+
import { default as default_2 } from 'react';
|
|
2
|
+
import { JSX } from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Represents a single activity/event in the stream
|
|
6
|
+
*/
|
|
7
|
+
export declare interface ActivityEvent {
|
|
8
|
+
/**
|
|
9
|
+
* Unique identifier for the event
|
|
10
|
+
*/
|
|
11
|
+
id: string | number;
|
|
12
|
+
/**
|
|
13
|
+
* Type/category of the event (e.g., 'commit', 'issue', 'pr', 'comment')
|
|
14
|
+
*/
|
|
15
|
+
type: string;
|
|
16
|
+
/**
|
|
17
|
+
* Display title for the event
|
|
18
|
+
*/
|
|
19
|
+
title: string;
|
|
20
|
+
/**
|
|
21
|
+
* Optional description or content
|
|
22
|
+
*/
|
|
23
|
+
description?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Timestamp of the event
|
|
26
|
+
*/
|
|
27
|
+
timestamp: Date | string;
|
|
28
|
+
/**
|
|
29
|
+
* Icon to display (can be emoji, React node, or icon class)
|
|
30
|
+
*/
|
|
31
|
+
icon?: default_2.ReactNode;
|
|
32
|
+
/**
|
|
33
|
+
* Optional metadata for the event (e.g., repository name, user, etc.)
|
|
34
|
+
*/
|
|
35
|
+
metadata?: Record<string, unknown>;
|
|
36
|
+
/**
|
|
37
|
+
* Whether the event is initially expanded
|
|
38
|
+
*/
|
|
39
|
+
initiallyExpanded?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Child events for grouped activities
|
|
42
|
+
*/
|
|
43
|
+
children?: ActivityEvent[];
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export declare const ActivityIcons: {
|
|
47
|
+
commit: default_2.FC<IconProps>;
|
|
48
|
+
pr: default_2.FC<IconProps>;
|
|
49
|
+
issue: default_2.FC<IconProps>;
|
|
50
|
+
comment: default_2.FC<IconProps>;
|
|
51
|
+
star: default_2.FC<IconProps>;
|
|
52
|
+
fork: default_2.FC<IconProps>;
|
|
53
|
+
merge: default_2.FC<IconProps>;
|
|
54
|
+
release: default_2.FC<IconProps>;
|
|
55
|
+
deploy: default_2.FC<IconProps>;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Pagination configuration for loading more events
|
|
60
|
+
*/
|
|
61
|
+
export declare interface ActivityStreamPagination {
|
|
62
|
+
currentPage: number;
|
|
63
|
+
pageSize: number;
|
|
64
|
+
totalItems?: number;
|
|
65
|
+
hasMore?: boolean;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export declare const AlienIcon: default_2.FC<IconProps>;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Convert blocks to HTML
|
|
72
|
+
*/
|
|
73
|
+
export declare function blocksToHTML(blocks: ContentBlock[]): string;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Convert blocks to JSON string
|
|
77
|
+
*/
|
|
78
|
+
export declare function blocksToJSON(blocks: ContentBlock[]): string;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Convert blocks to Markdown
|
|
82
|
+
*/
|
|
83
|
+
export declare function blocksToMarkdown(blocks: ContentBlock[]): string;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Block types supported by the editor
|
|
87
|
+
*/
|
|
88
|
+
export declare type BlockType = 'paragraph' | 'heading1' | 'heading2' | 'heading3' | 'list' | 'quote' | 'code' | 'image' | 'container';
|
|
89
|
+
|
|
90
|
+
export declare const BriefcaseIcon: default_2.FC<IconProps>;
|
|
91
|
+
|
|
92
|
+
export declare const BugIcon: default_2.FC<IconProps>;
|
|
93
|
+
|
|
94
|
+
export declare const BuildIcon: default_2.FC<IconProps>;
|
|
95
|
+
|
|
96
|
+
export declare const BusinessIcons: {
|
|
97
|
+
chart: default_2.FC<IconProps>;
|
|
98
|
+
meeting: default_2.FC<IconProps>;
|
|
99
|
+
document: default_2.FC<IconProps>;
|
|
100
|
+
calendar: default_2.FC<IconProps>;
|
|
101
|
+
briefcase: default_2.FC<IconProps>;
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* A customizable button component
|
|
106
|
+
*/
|
|
107
|
+
export declare const Button: default_2.FC<ButtonProps>;
|
|
108
|
+
|
|
109
|
+
export declare interface ButtonProps extends default_2.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
110
|
+
/**
|
|
111
|
+
* Variant style of the button
|
|
112
|
+
*/
|
|
113
|
+
variant?: 'primary' | 'secondary' | 'outline';
|
|
114
|
+
/**
|
|
115
|
+
* Size of the button
|
|
116
|
+
*/
|
|
117
|
+
size?: 'small' | 'medium' | 'large';
|
|
118
|
+
/**
|
|
119
|
+
* Button contents
|
|
120
|
+
*/
|
|
121
|
+
children: default_2.ReactNode;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export declare const CalendarIcon: default_2.FC<IconProps>;
|
|
125
|
+
|
|
126
|
+
export declare const ChartIcon: default_2.FC<IconProps>;
|
|
127
|
+
|
|
128
|
+
export declare const CheckIcon: default_2.FC<IconProps>;
|
|
129
|
+
|
|
130
|
+
export declare const CloseIcon: default_2.FC<IconProps>;
|
|
131
|
+
|
|
132
|
+
export declare const CloudIcon: default_2.FC<IconProps>;
|
|
133
|
+
|
|
134
|
+
export declare const CodeIcon: default_2.FC<IconProps>;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Represents a single option in the combo box
|
|
138
|
+
*/
|
|
139
|
+
export declare interface ComboBoxOption {
|
|
140
|
+
/**
|
|
141
|
+
* Unique value for this option
|
|
142
|
+
*/
|
|
143
|
+
value: string | number;
|
|
144
|
+
/**
|
|
145
|
+
* Display label for this option
|
|
146
|
+
*/
|
|
147
|
+
label: string;
|
|
148
|
+
/**
|
|
149
|
+
* Optional icon to display (can be a URL or React node)
|
|
150
|
+
*/
|
|
151
|
+
icon?: default_2.ReactNode;
|
|
152
|
+
/**
|
|
153
|
+
* Whether this option is disabled/non-selectable (for headers/dividers)
|
|
154
|
+
*/
|
|
155
|
+
disabled?: boolean;
|
|
156
|
+
/**
|
|
157
|
+
* Nesting level for hierarchical display (0 = root level)
|
|
158
|
+
*/
|
|
159
|
+
level?: number;
|
|
160
|
+
/**
|
|
161
|
+
* Child options for tree/hierarchical structure
|
|
162
|
+
*/
|
|
163
|
+
children?: ComboBoxOption[];
|
|
164
|
+
/**
|
|
165
|
+
* Optional custom data
|
|
166
|
+
*/
|
|
167
|
+
data?: unknown;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export declare const CommentIcon: default_2.FC<IconProps>;
|
|
171
|
+
|
|
172
|
+
export declare const CommitIcon: default_2.FC<IconProps>;
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Container layout types
|
|
176
|
+
*/
|
|
177
|
+
export declare type ContainerLayout = 'plain' | 'columns' | 'grid' | 'cards';
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Individual content block
|
|
181
|
+
*/
|
|
182
|
+
export declare interface ContentBlock {
|
|
183
|
+
id: string;
|
|
184
|
+
type: BlockType;
|
|
185
|
+
content: string;
|
|
186
|
+
format?: TextFormat;
|
|
187
|
+
layout?: ContainerLayout;
|
|
188
|
+
children?: ContentBlock[];
|
|
189
|
+
imageUrl?: string;
|
|
190
|
+
imageAlt?: string;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export declare const DatabaseIcon: default_2.FC<IconProps>;
|
|
194
|
+
|
|
195
|
+
export declare const DeployIcon: default_2.FC<IconProps>;
|
|
196
|
+
|
|
197
|
+
export declare const DeploymentIcon: default_2.FC<IconProps>;
|
|
198
|
+
|
|
199
|
+
export declare const DevProcessIcons: {
|
|
200
|
+
gitbranch: default_2.FC<IconProps>;
|
|
201
|
+
prdraft: default_2.FC<IconProps>;
|
|
202
|
+
testing: default_2.FC<IconProps>;
|
|
203
|
+
deployment: default_2.FC<IconProps>;
|
|
204
|
+
review: default_2.FC<IconProps>;
|
|
205
|
+
build: default_2.FC<IconProps>;
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
export declare const DocumentIcon: default_2.FC<IconProps>;
|
|
209
|
+
|
|
210
|
+
export declare const DumbbellIcon: default_2.FC<IconProps>;
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Export format options
|
|
214
|
+
*/
|
|
215
|
+
export declare type ExportFormat = 'json' | 'html' | 'markdown';
|
|
216
|
+
|
|
217
|
+
export declare const FitnessIcons: {
|
|
218
|
+
dumbbell: default_2.FC<IconProps>;
|
|
219
|
+
running: default_2.FC<IconProps>;
|
|
220
|
+
heartrate: default_2.FC<IconProps>;
|
|
221
|
+
strength: default_2.FC<IconProps>;
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
export declare const FoldIcon: default_2.FC<IconProps>;
|
|
225
|
+
|
|
226
|
+
export declare const ForkIcon: default_2.FC<IconProps>;
|
|
227
|
+
|
|
228
|
+
export declare const GitBranchIcon: default_2.FC<IconProps>;
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Action button configuration
|
|
232
|
+
*/
|
|
233
|
+
export declare interface GridActionButton {
|
|
234
|
+
/**
|
|
235
|
+
* Button label
|
|
236
|
+
*/
|
|
237
|
+
label: string;
|
|
238
|
+
/**
|
|
239
|
+
* Button variant (using Button component variants)
|
|
240
|
+
*/
|
|
241
|
+
variant?: 'primary' | 'secondary' | 'outline';
|
|
242
|
+
/**
|
|
243
|
+
* Click handler for the button
|
|
244
|
+
*/
|
|
245
|
+
onClick: (selectedRows: Record<string, unknown>[]) => void;
|
|
246
|
+
/**
|
|
247
|
+
* Whether button is disabled
|
|
248
|
+
*/
|
|
249
|
+
disabled?: boolean;
|
|
250
|
+
/**
|
|
251
|
+
* Only enable when rows are selected
|
|
252
|
+
*/
|
|
253
|
+
requiresSelection?: boolean;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Column definition for the grid
|
|
258
|
+
*/
|
|
259
|
+
export declare interface GridColumn<T = Record<string, unknown>> {
|
|
260
|
+
/**
|
|
261
|
+
* Unique identifier for the column
|
|
262
|
+
*/
|
|
263
|
+
key: string;
|
|
264
|
+
/**
|
|
265
|
+
* Display header text for the column
|
|
266
|
+
*/
|
|
267
|
+
header: string;
|
|
268
|
+
/**
|
|
269
|
+
* Field name in the data object
|
|
270
|
+
*/
|
|
271
|
+
field?: keyof T;
|
|
272
|
+
/**
|
|
273
|
+
* Custom render function for the cell
|
|
274
|
+
*/
|
|
275
|
+
render?: (value: unknown, row: T, rowIndex: number) => default_2.ReactNode;
|
|
276
|
+
/**
|
|
277
|
+
* Whether this column is editable
|
|
278
|
+
*/
|
|
279
|
+
editable?: boolean;
|
|
280
|
+
/**
|
|
281
|
+
* Width of the column (CSS value)
|
|
282
|
+
*/
|
|
283
|
+
width?: string;
|
|
284
|
+
/**
|
|
285
|
+
* Whether this column is sortable
|
|
286
|
+
*/
|
|
287
|
+
sortable?: boolean;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* Pagination configuration
|
|
292
|
+
*/
|
|
293
|
+
export declare interface GridPaginationConfig {
|
|
294
|
+
/**
|
|
295
|
+
* Current page (0-indexed)
|
|
296
|
+
*/
|
|
297
|
+
currentPage: number;
|
|
298
|
+
/**
|
|
299
|
+
* Number of items per page
|
|
300
|
+
*/
|
|
301
|
+
pageSize: number;
|
|
302
|
+
/**
|
|
303
|
+
* Total number of items (for server-side pagination)
|
|
304
|
+
*/
|
|
305
|
+
totalItems?: number;
|
|
306
|
+
/**
|
|
307
|
+
* Whether pagination is server-side
|
|
308
|
+
*/
|
|
309
|
+
serverSide?: boolean;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
export declare const HeartRateIcon: default_2.FC<IconProps>;
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* UIForge Icon Library
|
|
316
|
+
* A collection of monochrome SVG icons for use across UIForge components
|
|
317
|
+
*/
|
|
318
|
+
export declare interface IconProps {
|
|
319
|
+
size?: number;
|
|
320
|
+
className?: string;
|
|
321
|
+
color?: string;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
export declare const IssueIcon: default_2.FC<IconProps>;
|
|
325
|
+
|
|
326
|
+
export declare const MeditationIcon: default_2.FC<IconProps>;
|
|
327
|
+
|
|
328
|
+
export declare const MeetingIcon: default_2.FC<IconProps>;
|
|
329
|
+
|
|
330
|
+
export declare const MergeIcon: default_2.FC<IconProps>;
|
|
331
|
+
|
|
332
|
+
export declare const PlanetIcon: default_2.FC<IconProps>;
|
|
333
|
+
|
|
334
|
+
export declare const PullRequestDraftIcon: default_2.FC<IconProps>;
|
|
335
|
+
|
|
336
|
+
export declare const PullRequestIcon: default_2.FC<IconProps>;
|
|
337
|
+
|
|
338
|
+
export declare const ReleaseIcon: default_2.FC<IconProps>;
|
|
339
|
+
|
|
340
|
+
export declare const ReviewIcon: default_2.FC<IconProps>;
|
|
341
|
+
|
|
342
|
+
export declare const RocketIcon: default_2.FC<IconProps>;
|
|
343
|
+
|
|
344
|
+
export declare const RunningIcon: default_2.FC<IconProps>;
|
|
345
|
+
|
|
346
|
+
export declare const SatelliteIcon: default_2.FC<IconProps>;
|
|
347
|
+
|
|
348
|
+
export declare const ServerIcon: default_2.FC<IconProps>;
|
|
349
|
+
|
|
350
|
+
export declare const SpaceIcons: {
|
|
351
|
+
rocket: default_2.FC<IconProps>;
|
|
352
|
+
satellite: default_2.FC<IconProps>;
|
|
353
|
+
alien: default_2.FC<IconProps>;
|
|
354
|
+
planet: default_2.FC<IconProps>;
|
|
355
|
+
telescope: default_2.FC<IconProps>;
|
|
356
|
+
};
|
|
357
|
+
|
|
358
|
+
export declare const StarIcon: default_2.FC<IconProps>;
|
|
359
|
+
|
|
360
|
+
export declare const StrengthIcon: default_2.FC<IconProps>;
|
|
361
|
+
|
|
362
|
+
export declare const TaiChiIcon: default_2.FC<IconProps>;
|
|
363
|
+
|
|
364
|
+
export declare const TechIcons: {
|
|
365
|
+
server: default_2.FC<IconProps>;
|
|
366
|
+
database: default_2.FC<IconProps>;
|
|
367
|
+
cloud: default_2.FC<IconProps>;
|
|
368
|
+
terminal: default_2.FC<IconProps>;
|
|
369
|
+
bug: default_2.FC<IconProps>;
|
|
370
|
+
code: default_2.FC<IconProps>;
|
|
371
|
+
};
|
|
372
|
+
|
|
373
|
+
export declare const TelescopeIcon: default_2.FC<IconProps>;
|
|
374
|
+
|
|
375
|
+
export declare const TerminalIcon: default_2.FC<IconProps>;
|
|
376
|
+
|
|
377
|
+
export declare const TestingIcon: default_2.FC<IconProps>;
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Text formatting styles
|
|
381
|
+
*/
|
|
382
|
+
export declare interface TextFormat {
|
|
383
|
+
bold?: boolean;
|
|
384
|
+
italic?: boolean;
|
|
385
|
+
underline?: boolean;
|
|
386
|
+
code?: boolean;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* A GitHub-inspired activity stream component with smart grouping, timeline, and theming
|
|
391
|
+
*/
|
|
392
|
+
export declare const UIForgeActivityStream: default_2.FC<UIForgeActivityStreamProps>;
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* Props for the UIForgeActivityStream component
|
|
396
|
+
*/
|
|
397
|
+
export declare interface UIForgeActivityStreamProps {
|
|
398
|
+
/**
|
|
399
|
+
* Array of activity events to display
|
|
400
|
+
*/
|
|
401
|
+
events: ActivityEvent[];
|
|
402
|
+
/**
|
|
403
|
+
* Theme variant ('light' or 'dark')
|
|
404
|
+
*/
|
|
405
|
+
theme?: 'light' | 'dark';
|
|
406
|
+
/**
|
|
407
|
+
* Custom className for styling
|
|
408
|
+
*/
|
|
409
|
+
className?: string;
|
|
410
|
+
/**
|
|
411
|
+
* Whether to show the "Show more" bar
|
|
412
|
+
*/
|
|
413
|
+
showLoadMore?: boolean;
|
|
414
|
+
/**
|
|
415
|
+
* Loading state for async operations
|
|
416
|
+
*/
|
|
417
|
+
loading?: boolean;
|
|
418
|
+
/**
|
|
419
|
+
* Callback when "Show more" is clicked or triggered
|
|
420
|
+
*/
|
|
421
|
+
onLoadMore?: () => void;
|
|
422
|
+
/**
|
|
423
|
+
* Pagination configuration
|
|
424
|
+
*/
|
|
425
|
+
pagination?: ActivityStreamPagination;
|
|
426
|
+
/**
|
|
427
|
+
* Maximum height of the stream container (CSS value)
|
|
428
|
+
*/
|
|
429
|
+
maxHeight?: string;
|
|
430
|
+
/**
|
|
431
|
+
* Distance from bottom to trigger "Show more" visibility (in pixels)
|
|
432
|
+
*/
|
|
433
|
+
showMoreThreshold?: number;
|
|
434
|
+
/**
|
|
435
|
+
* Whether all events should be initially expanded
|
|
436
|
+
*/
|
|
437
|
+
initiallyExpandedAll?: boolean;
|
|
438
|
+
/**
|
|
439
|
+
* Empty state message
|
|
440
|
+
*/
|
|
441
|
+
emptyMessage?: string;
|
|
442
|
+
/**
|
|
443
|
+
* Callback when an event is expanded/collapsed
|
|
444
|
+
*/
|
|
445
|
+
onToggleExpand?: (eventId: string | number, expanded: boolean) => void;
|
|
446
|
+
/**
|
|
447
|
+
* Whether to enable automatic grouping of consecutive events
|
|
448
|
+
*/
|
|
449
|
+
enableGrouping?: boolean;
|
|
450
|
+
/**
|
|
451
|
+
* Minimum number of consecutive events to trigger grouping
|
|
452
|
+
*/
|
|
453
|
+
groupingThreshold?: number;
|
|
454
|
+
/**
|
|
455
|
+
* Whether to show date separators
|
|
456
|
+
*/
|
|
457
|
+
showDateSeparators?: boolean;
|
|
458
|
+
/**
|
|
459
|
+
* Whether to show the timeline line
|
|
460
|
+
*/
|
|
461
|
+
showTimeline?: boolean;
|
|
462
|
+
/**
|
|
463
|
+
* Global scale factor (density) for spacing and icon sizes in the stream.
|
|
464
|
+
* Set to values like 0.8 for compact, 1 for default, 1.2 for spacious.
|
|
465
|
+
*/
|
|
466
|
+
scale?: number;
|
|
467
|
+
/**
|
|
468
|
+
* Custom icon renderer
|
|
469
|
+
*/
|
|
470
|
+
renderIcon?: (event: ActivityEvent) => default_2.ReactNode;
|
|
471
|
+
/**
|
|
472
|
+
* Custom event renderer
|
|
473
|
+
*/
|
|
474
|
+
renderEvent?: (event: ActivityEvent) => default_2.ReactNode;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* UIForgeBlocksEditor - A rich, block-based content editor
|
|
479
|
+
*
|
|
480
|
+
* Enables users to format and position content with flexible layouts.
|
|
481
|
+
* Supports multiple block types, drag-and-drop, WYSIWYG formatting,
|
|
482
|
+
* and content export to JSON, HTML, or markdown.
|
|
483
|
+
*
|
|
484
|
+
* @example
|
|
485
|
+
* ```tsx
|
|
486
|
+
* import { UIForgeBlocksEditor } from '@appforgeapps/uiforge'
|
|
487
|
+
*
|
|
488
|
+
* function MyEditor() {
|
|
489
|
+
* const [blocks, setBlocks] = useState([])
|
|
490
|
+
*
|
|
491
|
+
* return (
|
|
492
|
+
* <UIForgeBlocksEditor
|
|
493
|
+
* initialBlocks={blocks}
|
|
494
|
+
* onChange={setBlocks}
|
|
495
|
+
* placeholder="Start typing..."
|
|
496
|
+
* />
|
|
497
|
+
* )
|
|
498
|
+
* }
|
|
499
|
+
* ```
|
|
500
|
+
*/
|
|
501
|
+
export declare const UIForgeBlocksEditor: default_2.FC<UIForgeBlocksEditorProps>;
|
|
502
|
+
|
|
503
|
+
/**
|
|
504
|
+
* Props for the UIForgeBlocksEditor component
|
|
505
|
+
*/
|
|
506
|
+
export declare interface UIForgeBlocksEditorProps {
|
|
507
|
+
/**
|
|
508
|
+
* Initial blocks to display
|
|
509
|
+
*/
|
|
510
|
+
initialBlocks?: ContentBlock[];
|
|
511
|
+
/**
|
|
512
|
+
* Callback when blocks change
|
|
513
|
+
*/
|
|
514
|
+
onChange?: (blocks: ContentBlock[]) => void;
|
|
515
|
+
/**
|
|
516
|
+
* Placeholder text for empty editor
|
|
517
|
+
*/
|
|
518
|
+
placeholder?: string;
|
|
519
|
+
/**
|
|
520
|
+
* Whether the editor is read-only
|
|
521
|
+
*/
|
|
522
|
+
readOnly?: boolean;
|
|
523
|
+
/**
|
|
524
|
+
* Custom CSS class name
|
|
525
|
+
*/
|
|
526
|
+
className?: string;
|
|
527
|
+
/**
|
|
528
|
+
* Maximum height of the editor (CSS value)
|
|
529
|
+
*/
|
|
530
|
+
maxHeight?: string;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
/**
|
|
534
|
+
* UIForgeComboBox - A rich, powerful select/combo box component
|
|
535
|
+
*
|
|
536
|
+
* Features:
|
|
537
|
+
* - Static and dynamic data support
|
|
538
|
+
* - Icons per option
|
|
539
|
+
* - Hierarchical/tree view
|
|
540
|
+
* - Non-selectable headers
|
|
541
|
+
* - Async callback support
|
|
542
|
+
* - Keyboard navigation
|
|
543
|
+
* - Accessibility (ARIA)
|
|
544
|
+
*/
|
|
545
|
+
export declare const UIForgeComboBox: default_2.FC<UIForgeComboBoxProps>;
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* Props for the UIForgeComboBox component
|
|
549
|
+
*/
|
|
550
|
+
export declare interface UIForgeComboBoxProps {
|
|
551
|
+
/**
|
|
552
|
+
* Static list of options
|
|
553
|
+
*/
|
|
554
|
+
options?: ComboBoxOption[];
|
|
555
|
+
/**
|
|
556
|
+
* Selected value
|
|
557
|
+
*/
|
|
558
|
+
value?: string | number | null;
|
|
559
|
+
/**
|
|
560
|
+
* Callback when selection changes
|
|
561
|
+
*/
|
|
562
|
+
onChange?: (value: string | number | null, option: ComboBoxOption | null) => void;
|
|
563
|
+
/**
|
|
564
|
+
* Async callback for dynamic suggestions (receives search text)
|
|
565
|
+
*/
|
|
566
|
+
onSearch?: (searchText: string, signal?: AbortSignal) => Promise<ComboBoxOption[]>;
|
|
567
|
+
/**
|
|
568
|
+
* Placeholder text
|
|
569
|
+
*/
|
|
570
|
+
placeholder?: string;
|
|
571
|
+
/**
|
|
572
|
+
* Whether the combo box is disabled
|
|
573
|
+
*/
|
|
574
|
+
disabled?: boolean;
|
|
575
|
+
/**
|
|
576
|
+
* Whether to allow clearing the selection
|
|
577
|
+
*/
|
|
578
|
+
clearable?: boolean;
|
|
579
|
+
/**
|
|
580
|
+
* Custom class name
|
|
581
|
+
*/
|
|
582
|
+
className?: string;
|
|
583
|
+
/**
|
|
584
|
+
* Custom rendering for options
|
|
585
|
+
*/
|
|
586
|
+
renderOption?: (option: ComboBoxOption) => default_2.ReactNode;
|
|
587
|
+
/**
|
|
588
|
+
* Custom rendering for selected value
|
|
589
|
+
*/
|
|
590
|
+
renderValue?: (option: ComboBoxOption | null) => default_2.ReactNode;
|
|
591
|
+
/**
|
|
592
|
+
* Loading state
|
|
593
|
+
*/
|
|
594
|
+
loading?: boolean;
|
|
595
|
+
/**
|
|
596
|
+
* Maximum height for dropdown (CSS value)
|
|
597
|
+
*/
|
|
598
|
+
maxHeight?: string;
|
|
599
|
+
/**
|
|
600
|
+
* Debounce delay for async search (ms)
|
|
601
|
+
*/
|
|
602
|
+
debounceMs?: number;
|
|
603
|
+
/**
|
|
604
|
+
* Whether to show the search/filter input
|
|
605
|
+
*/
|
|
606
|
+
searchable?: boolean;
|
|
607
|
+
/**
|
|
608
|
+
* Whether to cache identical search results in-memory (per component instance)
|
|
609
|
+
*/
|
|
610
|
+
enableCache?: boolean;
|
|
611
|
+
/**
|
|
612
|
+
* Time-to-live for cached entries in milliseconds (default: no expiration)
|
|
613
|
+
*/
|
|
614
|
+
cacheTTL?: number;
|
|
615
|
+
/**
|
|
616
|
+
* Whether to refresh results on dropdown open even if search text hasn't changed
|
|
617
|
+
*/
|
|
618
|
+
refreshOnOpen?: boolean;
|
|
619
|
+
/**
|
|
620
|
+
* Callback to clear the internal cache (call this function to clear)
|
|
621
|
+
*/
|
|
622
|
+
onClearCache?: (clearFn: () => void) => void;
|
|
623
|
+
/**
|
|
624
|
+
* Callback to receive a function to force refresh current search
|
|
625
|
+
*/
|
|
626
|
+
onForceRefresh?: (forceFn: () => void) => void;
|
|
627
|
+
/**
|
|
628
|
+
* Message to show when no options match
|
|
629
|
+
*/
|
|
630
|
+
noOptionsMessage?: string;
|
|
631
|
+
/**
|
|
632
|
+
* ARIA label for accessibility
|
|
633
|
+
*/
|
|
634
|
+
ariaLabel?: string;
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
/**
|
|
638
|
+
* UIForgeGrid - A feature-rich data grid component
|
|
639
|
+
*/
|
|
640
|
+
export declare const UIForgeGrid: <T extends Record<string, unknown>>({ columns, data, selectable, selectedRows: controlledSelectedRows, getRowKey, onSelectionChange, onCellEdit, actionButtons, searchable, searchPlaceholder, onSearch, customFilter, pagination, onPageChange, onPageSizeChange, pageSizeOptions, className, loading, emptyMessage, }: UIForgeGridProps<T>) => JSX.Element;
|
|
641
|
+
|
|
642
|
+
/**
|
|
643
|
+
* Props for the UIForgeGrid component
|
|
644
|
+
*/
|
|
645
|
+
export declare interface UIForgeGridProps<T = Record<string, unknown>> {
|
|
646
|
+
/**
|
|
647
|
+
* Column definitions
|
|
648
|
+
*/
|
|
649
|
+
columns: GridColumn<T>[];
|
|
650
|
+
/**
|
|
651
|
+
* Data to display in the grid
|
|
652
|
+
*/
|
|
653
|
+
data: T[];
|
|
654
|
+
/**
|
|
655
|
+
* Enable row selection
|
|
656
|
+
*/
|
|
657
|
+
selectable?: boolean;
|
|
658
|
+
/**
|
|
659
|
+
* Currently selected row keys
|
|
660
|
+
*/
|
|
661
|
+
selectedRows?: Set<string | number>;
|
|
662
|
+
/**
|
|
663
|
+
* Function to get unique key from row data
|
|
664
|
+
*/
|
|
665
|
+
getRowKey?: (row: T, index: number) => string | number;
|
|
666
|
+
/**
|
|
667
|
+
* Called when selection changes
|
|
668
|
+
*/
|
|
669
|
+
onSelectionChange?: (selectedKeys: Set<string | number>, selectedRows: T[]) => void;
|
|
670
|
+
/**
|
|
671
|
+
* Called when a cell is edited
|
|
672
|
+
*/
|
|
673
|
+
onCellEdit?: (rowKey: string | number, columnKey: string, newValue: unknown, row: T) => void;
|
|
674
|
+
/**
|
|
675
|
+
* Action buttons to display
|
|
676
|
+
*/
|
|
677
|
+
actionButtons?: GridActionButton[];
|
|
678
|
+
/**
|
|
679
|
+
* Enable search functionality
|
|
680
|
+
*/
|
|
681
|
+
searchable?: boolean;
|
|
682
|
+
/**
|
|
683
|
+
* Search placeholder text
|
|
684
|
+
*/
|
|
685
|
+
searchPlaceholder?: string;
|
|
686
|
+
/**
|
|
687
|
+
* Called when search value changes
|
|
688
|
+
*/
|
|
689
|
+
onSearch?: (searchTerm: string) => void;
|
|
690
|
+
/**
|
|
691
|
+
* Custom filter function
|
|
692
|
+
*/
|
|
693
|
+
customFilter?: (row: T, searchTerm: string) => boolean;
|
|
694
|
+
/**
|
|
695
|
+
* Pagination configuration
|
|
696
|
+
*/
|
|
697
|
+
pagination?: GridPaginationConfig;
|
|
698
|
+
/**
|
|
699
|
+
* Called when page changes
|
|
700
|
+
*/
|
|
701
|
+
onPageChange?: (page: number, pageSize: number) => void;
|
|
702
|
+
/**
|
|
703
|
+
* Called when page size changes
|
|
704
|
+
*/
|
|
705
|
+
onPageSizeChange?: (pageSize: number) => void;
|
|
706
|
+
/**
|
|
707
|
+
* Available page sizes
|
|
708
|
+
*/
|
|
709
|
+
pageSizeOptions?: number[];
|
|
710
|
+
/**
|
|
711
|
+
* Additional CSS class names
|
|
712
|
+
*/
|
|
713
|
+
className?: string;
|
|
714
|
+
/**
|
|
715
|
+
* Whether the grid is in loading state
|
|
716
|
+
*/
|
|
717
|
+
loading?: boolean;
|
|
718
|
+
/**
|
|
719
|
+
* Message to display when no data
|
|
720
|
+
*/
|
|
721
|
+
emptyMessage?: string;
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
/**
|
|
725
|
+
* UIForgeVideo - A video component with overlay that supports YouTube and Vimeo embeds
|
|
726
|
+
*
|
|
727
|
+
* Features:
|
|
728
|
+
* - Displays video title and optional description
|
|
729
|
+
* - Supports YouTube and Vimeo video embeds
|
|
730
|
+
* - Shows thumbnail with overlay icon before playing
|
|
731
|
+
* - Emits event when video is clicked to play
|
|
732
|
+
* - Lazy loads the video player on interaction
|
|
733
|
+
*
|
|
734
|
+
* @example
|
|
735
|
+
* ```tsx
|
|
736
|
+
* <UIForgeVideo
|
|
737
|
+
* title="Introduction to React"
|
|
738
|
+
* description="Learn React basics in this tutorial"
|
|
739
|
+
* youtubeId="dQw4w9WgXcQ"
|
|
740
|
+
* onPlay={(videoId, provider) => {
|
|
741
|
+
* console.log(`Playing ${provider} video: ${videoId}`)
|
|
742
|
+
* }}
|
|
743
|
+
* />
|
|
744
|
+
* ```
|
|
745
|
+
*/
|
|
746
|
+
export declare const UIForgeVideo: default_2.FC<UIForgeVideoProps>;
|
|
747
|
+
|
|
748
|
+
/**
|
|
749
|
+
* UIForgeVideoPreview - A compact video preview component with title and icon
|
|
750
|
+
*
|
|
751
|
+
* Features:
|
|
752
|
+
* - Displays video title
|
|
753
|
+
* - Shows small video icon
|
|
754
|
+
* - Clickable for navigation or actions
|
|
755
|
+
*
|
|
756
|
+
* @example
|
|
757
|
+
* ```tsx
|
|
758
|
+
* <UIForgeVideoPreview
|
|
759
|
+
* title="Introduction to React"
|
|
760
|
+
* onClick={() => navigate('/video/123')}
|
|
761
|
+
* />
|
|
762
|
+
* ```
|
|
763
|
+
*/
|
|
764
|
+
export declare const UIForgeVideoPreview: default_2.FC<UIForgeVideoPreviewProps>;
|
|
765
|
+
|
|
766
|
+
/**
|
|
767
|
+
* Props for the UIForgeVideoPreview component
|
|
768
|
+
*/
|
|
769
|
+
export declare interface UIForgeVideoPreviewProps {
|
|
770
|
+
/**
|
|
771
|
+
* Video title
|
|
772
|
+
*/
|
|
773
|
+
title: string;
|
|
774
|
+
/**
|
|
775
|
+
* Optional icon to display next to the title
|
|
776
|
+
*/
|
|
777
|
+
icon?: default_2.ReactNode;
|
|
778
|
+
/**
|
|
779
|
+
* Custom className for styling
|
|
780
|
+
*/
|
|
781
|
+
className?: string;
|
|
782
|
+
/**
|
|
783
|
+
* Click handler
|
|
784
|
+
*/
|
|
785
|
+
onClick?: () => void;
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
/**
|
|
789
|
+
* Props for the UIForgeVideo component
|
|
790
|
+
*/
|
|
791
|
+
export declare interface UIForgeVideoProps {
|
|
792
|
+
/**
|
|
793
|
+
* Video title
|
|
794
|
+
*/
|
|
795
|
+
title: string;
|
|
796
|
+
/**
|
|
797
|
+
* Video description
|
|
798
|
+
*/
|
|
799
|
+
description?: string;
|
|
800
|
+
/**
|
|
801
|
+
* YouTube video ID (e.g., "dQw4w9WgXcQ" from https://www.youtube.com/watch?v=dQw4w9WgXcQ)
|
|
802
|
+
*/
|
|
803
|
+
youtubeId?: string;
|
|
804
|
+
/**
|
|
805
|
+
* Vimeo video ID (e.g., "123456789" from https://vimeo.com/123456789)
|
|
806
|
+
*/
|
|
807
|
+
vimeoId?: string;
|
|
808
|
+
/**
|
|
809
|
+
* Custom thumbnail URL (optional, will use provider's default if not specified)
|
|
810
|
+
*/
|
|
811
|
+
thumbnailUrl?: string;
|
|
812
|
+
/**
|
|
813
|
+
* Callback fired when the video overlay is clicked and playback begins
|
|
814
|
+
*/
|
|
815
|
+
onPlay?: (videoId: string, provider: 'youtube' | 'vimeo') => void;
|
|
816
|
+
/**
|
|
817
|
+
* Custom className for styling
|
|
818
|
+
*/
|
|
819
|
+
className?: string;
|
|
820
|
+
/**
|
|
821
|
+
* Custom overlay icon (defaults to play icon)
|
|
822
|
+
*/
|
|
823
|
+
overlayIcon?: default_2.ReactNode;
|
|
824
|
+
/**
|
|
825
|
+
* Aspect ratio of the video player (default: "16/9")
|
|
826
|
+
*/
|
|
827
|
+
aspectRatio?: string;
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
export declare const UIIcons: {
|
|
831
|
+
unfold: default_2.FC<IconProps>;
|
|
832
|
+
fold: default_2.FC<IconProps>;
|
|
833
|
+
close: default_2.FC<IconProps>;
|
|
834
|
+
check: default_2.FC<IconProps>;
|
|
835
|
+
};
|
|
836
|
+
|
|
837
|
+
export declare const UnfoldIcon: default_2.FC<IconProps>;
|
|
838
|
+
|
|
839
|
+
export declare const WellnessIcons: {
|
|
840
|
+
taichi: default_2.FC<IconProps>;
|
|
841
|
+
meditation: default_2.FC<IconProps>;
|
|
842
|
+
yoga: default_2.FC<IconProps>;
|
|
843
|
+
};
|
|
844
|
+
|
|
845
|
+
export declare const YogaIcon: default_2.FC<IconProps>;
|
|
846
|
+
|
|
847
|
+
export { }
|