@ttoss/components 2.14.25 → 2.14.27

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.
Files changed (47) hide show
  1. package/dist/index.d.mts +910 -0
  2. package/dist/index.mjs +3074 -0
  3. package/package.json +17 -100
  4. package/dist/Accordion/index.d.mts +0 -157
  5. package/dist/Accordion/index.mjs +0 -175
  6. package/dist/DatePicker/index.d.mts +0 -26
  7. package/dist/DatePicker/index.mjs +0 -339
  8. package/dist/Drawer/index.d.mts +0 -17
  9. package/dist/Drawer/index.mjs +0 -66
  10. package/dist/EnhancedTitle/index.d.mts +0 -107
  11. package/dist/EnhancedTitle/index.mjs +0 -234
  12. package/dist/FileUploader/index.d.mts +0 -77
  13. package/dist/FileUploader/index.mjs +0 -386
  14. package/dist/InstallPwa/index.d.mts +0 -13
  15. package/dist/InstallPwa/index.mjs +0 -64
  16. package/dist/JsonEditor/index.d.mts +0 -3
  17. package/dist/JsonEditor/index.mjs +0 -3
  18. package/dist/JsonView/index.d.mts +0 -3
  19. package/dist/JsonView/index.mjs +0 -3
  20. package/dist/List/index.d.mts +0 -16
  21. package/dist/List/index.mjs +0 -34
  22. package/dist/LockedOverlay/index.d.mts +0 -162
  23. package/dist/LockedOverlay/index.mjs +0 -386
  24. package/dist/Markdown/index.d.mts +0 -16
  25. package/dist/Markdown/index.mjs +0 -26
  26. package/dist/Menu/index.d.mts +0 -16
  27. package/dist/Menu/index.mjs +0 -136
  28. package/dist/MetricCard/index.d.mts +0 -153
  29. package/dist/MetricCard/index.mjs +0 -408
  30. package/dist/Modal/index.d.mts +0 -11
  31. package/dist/Modal/index.mjs +0 -64
  32. package/dist/NavList/index.d.mts +0 -64
  33. package/dist/NavList/index.mjs +0 -252
  34. package/dist/NotificationCard/index.d.mts +0 -22
  35. package/dist/NotificationCard/index.mjs +0 -173
  36. package/dist/NotificationsMenu/index.d.mts +0 -47
  37. package/dist/NotificationsMenu/index.mjs +0 -380
  38. package/dist/Search/index.d.mts +0 -18
  39. package/dist/Search/index.mjs +0 -31
  40. package/dist/SpotlightCard/index.d.mts +0 -36
  41. package/dist/SpotlightCard/index.mjs +0 -219
  42. package/dist/Table/index.d.mts +0 -17
  43. package/dist/Table/index.mjs +0 -64
  44. package/dist/Tabs/index.d.mts +0 -17
  45. package/dist/Tabs/index.mjs +0 -87
  46. package/dist/Toast/index.d.mts +0 -8
  47. package/dist/Toast/index.mjs +0 -43
@@ -0,0 +1,910 @@
1
+
2
+ import { BadgeProps, BoxProps, ButtonProps, FlexProps, InputProps, Theme, ThemeUIStyleObject } from "@ttoss/ui";
3
+ import * as React from "react";
4
+ import { IconType } from "@ttoss/react-icons";
5
+ import DrawerUi from "react-modern-drawer";
6
+ import { JsonEditor } from "json-edit-react";
7
+ import { JsonView } from "react-json-view-lite";
8
+ import { Options } from "react-markdown";
9
+ import ReactModal from "react-modal";
10
+ import { createCell, createColumnHelper, flexRender, getCoreRowModel, useReactTable } from "@tanstack/react-table";
11
+ import { TabListProps, TabPanelProps, TabProps, TabsProps } from "react-tabs";
12
+ import { ToastContainerProps, ToastOptions, toast as toast$1 } from "react-toastify";
13
+
14
+ //#region src/components/Accordion/Accordion.d.ts
15
+ /**
16
+ * Individual item for the Accordion component.
17
+ */
18
+ type AccordionItem = {
19
+ /**
20
+ * Unique identifier for the accordion item.
21
+ * If not provided, will use the index as the key.
22
+ */
23
+ id?: string;
24
+ /**
25
+ * Title displayed in the accordion header.
26
+ */
27
+ title: React.ReactNode;
28
+ /**
29
+ * Content displayed when the accordion item is expanded.
30
+ */
31
+ content: React.ReactNode;
32
+ /**
33
+ * Whether the item is disabled.
34
+ * @default false
35
+ */
36
+ disabled?: boolean;
37
+ };
38
+ /**
39
+ * Render props for custom accordion item rendering.
40
+ */
41
+ type AccordionRenderItemProps = {
42
+ /**
43
+ * The accordion item data.
44
+ */
45
+ item: AccordionItem;
46
+ /**
47
+ * Index of the item in the items array.
48
+ */
49
+ index: number;
50
+ /**
51
+ * Whether the item is currently expanded.
52
+ */
53
+ isExpanded: boolean;
54
+ /**
55
+ * Function to toggle the item's expanded state.
56
+ */
57
+ toggle: () => void;
58
+ /**
59
+ * Generated IDs for accessibility.
60
+ */
61
+ ids: {
62
+ itemId: string;
63
+ headingId: string;
64
+ panelId: string;
65
+ };
66
+ };
67
+ /**
68
+ * Props for the Accordion component.
69
+ */
70
+ type AccordionProps = BoxProps & {
71
+ /**
72
+ * Array of accordion items to render.
73
+ */
74
+ items: AccordionItem[];
75
+ /**
76
+ * Whether multiple items can be expanded at once.
77
+ * @default false
78
+ */
79
+ multiple?: boolean;
80
+ /**
81
+ * Index or array of indices for initially expanded items.
82
+ */
83
+ defaultExpanded?: number | number[];
84
+ /**
85
+ * Callback invoked when items are expanded or collapsed.
86
+ * Receives array of currently expanded indices.
87
+ */
88
+ onAccordionChange?: (expandedIndices: number[]) => void;
89
+ /**
90
+ * Custom render function for accordion items.
91
+ * Provides full control over item rendering while maintaining accessibility.
92
+ */
93
+ renderItem?: (props: AccordionRenderItemProps) => React.ReactNode;
94
+ };
95
+ /**
96
+ * Accessible accordion component with collapsible content sections.
97
+ *
98
+ * This component provides a simplified API for creating expandable/collapsible
99
+ * content sections. It uses design tokens from @ttoss/theme for consistent styling
100
+ * and follows WAI-ARIA accordion pattern for accessibility.
101
+ *
102
+ * @example
103
+ * ```tsx
104
+ * <Accordion
105
+ * items={[
106
+ * {
107
+ * title: 'Section 1',
108
+ * content: 'Content for section 1',
109
+ * },
110
+ * {
111
+ * title: 'Section 2',
112
+ * content: 'Content for section 2',
113
+ * },
114
+ * ]}
115
+ * />
116
+ * ```
117
+ *
118
+ * @example
119
+ * ```tsx
120
+ * <Accordion
121
+ * multiple
122
+ * defaultExpanded={[0, 1]}
123
+ * items={[
124
+ * {
125
+ * id: 'item-1',
126
+ * title: 'Pre-expanded Section 1',
127
+ * content: <div>Rich content</div>,
128
+ * },
129
+ * {
130
+ * id: 'item-2',
131
+ * title: 'Pre-expanded Section 2',
132
+ * content: <p>More content</p>,
133
+ * },
134
+ * ]}
135
+ * onAccordionChange={(expanded) => console.log('Expanded items:', expanded)}
136
+ * />
137
+ * ```
138
+ *
139
+ * @example
140
+ * ```tsx
141
+ * // Custom rendering with renderItem
142
+ * <Accordion
143
+ * items={items}
144
+ * renderItem={({ item, isExpanded, toggle, ids }) => (
145
+ * <CustomAccordionItem
146
+ * item={item}
147
+ * isExpanded={isExpanded}
148
+ * onToggle={toggle}
149
+ * headingId={ids.headingId}
150
+ * panelId={ids.panelId}
151
+ * />
152
+ * )}
153
+ * />
154
+ * ```
155
+ */
156
+ declare const Accordion: ({
157
+ items,
158
+ multiple,
159
+ defaultExpanded,
160
+ onAccordionChange,
161
+ renderItem,
162
+ sx,
163
+ ...boxProps
164
+ }: AccordionProps) => import("react/jsx-runtime").JSX.Element;
165
+ //#endregion
166
+ //#region src/components/DatePicker/DatePicker.d.ts
167
+ interface DateRange {
168
+ from: Date | undefined;
169
+ to: Date | undefined;
170
+ }
171
+ interface DateRangePreset {
172
+ label: string;
173
+ getValue: () => DateRange;
174
+ }
175
+ interface DatePickerProps {
176
+ label?: string;
177
+ value?: DateRange;
178
+ presets?: DateRangePreset[];
179
+ onChange?: (range: DateRange | undefined) => void;
180
+ disabled?: boolean;
181
+ }
182
+ declare const DatePicker: ({
183
+ label,
184
+ value,
185
+ presets,
186
+ onChange,
187
+ disabled
188
+ }: DatePickerProps) => import("react/jsx-runtime").JSX.Element;
189
+ //#endregion
190
+ //#region src/components/Drawer/Drawer.d.ts
191
+ type DrawerUiProps = React.ComponentProps<typeof DrawerUi>;
192
+ type DrawerProps = DrawerUiProps & {
193
+ sx?: BoxProps['sx'];
194
+ };
195
+ declare const Drawer: ({
196
+ children,
197
+ sx,
198
+ ...props
199
+ }: DrawerProps) => import("react/jsx-runtime").JSX.Element;
200
+ //#endregion
201
+ //#region src/components/EnhancedTitle/EnhancedTitle.types.d.ts
202
+ /**
203
+ * Visual variant for the icon wrapper.
204
+ */
205
+ type EnhancedTitleVariant = 'spotlight-accent' | 'spotlight-primary' | 'primary' | 'secondary' | 'accent' | 'positive' | 'negative' | 'informative' | 'muted';
206
+ /**
207
+ * Badge configuration for top and bottom badge sections.
208
+ */
209
+ interface EnhancedTitleBadge {
210
+ /**
211
+ * Icon to display in the badge.
212
+ */
213
+ icon?: string;
214
+ /**
215
+ * Badge label text.
216
+ */
217
+ label: string;
218
+ /**
219
+ * Badge visual variant.
220
+ */
221
+ variant?: BadgeProps['variant'];
222
+ }
223
+ /**
224
+ * Props for the EnhancedTitle component.
225
+ */
226
+ interface EnhancedTitleProps {
227
+ /**
228
+ * Visual variant for the icon wrapper.
229
+ * @default 'primary'
230
+ */
231
+ variant?: EnhancedTitleVariant;
232
+ /**
233
+ * Icon to display next to the title.
234
+ */
235
+ icon?: string;
236
+ /**
237
+ * Main title text (heading).
238
+ */
239
+ title: string;
240
+ /**
241
+ * Optional subtitle/description text.
242
+ */
243
+ description?: string;
244
+ /**
245
+ * Optional text displayed next to the title (e.g., price, metadata).
246
+ */
247
+ frontTitle?: string;
248
+ /**
249
+ * Badges to display above the title.
250
+ */
251
+ topBadges?: EnhancedTitleBadge[];
252
+ /**
253
+ * Badges to display below the title.
254
+ */
255
+ bottomBadges?: EnhancedTitleBadge[];
256
+ }
257
+ //#endregion
258
+ //#region src/components/EnhancedTitle/EnhancedTitle.d.ts
259
+ /**
260
+ * EnhancedTitle component renders a structured title section with icon, badges, and metadata.
261
+ *
262
+ * This component is useful for displaying rich title sections with status indicators,
263
+ * feature tags, and supplementary information in a consistent layout.
264
+ *
265
+ * @example
266
+ * ```tsx
267
+ * <EnhancedTitle
268
+ * icon="fluent:shield-24-filled"
269
+ * title="Starter Plan"
270
+ * frontTitle="R$ 49,90/mês"
271
+ * description="Perfect for small teams"
272
+ * variant="primary"
273
+ * topBadges={[
274
+ * { label: 'Active', variant: 'positive', icon: 'fluent:checkmark-circle-24-filled' }
275
+ * ]}
276
+ * bottomBadges={[
277
+ * { label: 'OneClick Tracking', icon: 'fluent:checkmark-24-filled' }
278
+ * ]}
279
+ * />
280
+ * ```
281
+ *
282
+ * @example
283
+ * ```tsx
284
+ * <EnhancedTitle
285
+ * title="Pro Plan"
286
+ * frontTitle="$99/month"
287
+ * variant="accent"
288
+ * topBadges={[
289
+ * { label: 'Most Popular', variant: 'informative' }
290
+ * ]}
291
+ * />
292
+ * ```
293
+ */
294
+ declare const EnhancedTitle: ({
295
+ variant,
296
+ icon,
297
+ title,
298
+ description,
299
+ frontTitle,
300
+ topBadges,
301
+ bottomBadges
302
+ }: EnhancedTitleProps) => import("react/jsx-runtime").JSX.Element;
303
+ //#endregion
304
+ //#region src/components/FileUploader/FileUploader.d.ts
305
+ type UploadResult = {
306
+ url: string;
307
+ id: string | number;
308
+ };
309
+ type FileUploadState = {
310
+ file: File;
311
+ status: 'pending' | 'uploading' | 'completed' | 'error';
312
+ progress?: number;
313
+ result?: UploadResult;
314
+ error?: Error;
315
+ };
316
+ type OnUpload = (file: File, onProgress?: (progress: number) => void) => Promise<UploadResult>;
317
+ type OnUploadStart = (file: File) => void;
318
+ type OnUploadProgress = (file: File, progress: number) => void;
319
+ type OnUploadComplete = (file: File, result: UploadResult) => void;
320
+ type OnUploadError = (file: File, error: Error) => void;
321
+ type OnFilesChange = (files: FileUploadState[]) => void;
322
+ type OnRemove = (file: UploadedFile, index: number) => void;
323
+ type UploadedFile = {
324
+ id: string | number;
325
+ name: string;
326
+ imageUrl?: string;
327
+ url: string;
328
+ };
329
+ type FileUploaderProps = {
330
+ onUpload: OnUpload;
331
+ onUploadStart?: OnUploadStart;
332
+ onUploadProgress?: OnUploadProgress;
333
+ onUploadComplete?: OnUploadComplete;
334
+ onUploadError?: OnUploadError;
335
+ onFilesChange?: OnFilesChange;
336
+ onRemove?: OnRemove;
337
+ accept?: string;
338
+ multiple?: boolean;
339
+ maxSize?: number;
340
+ maxFiles?: number;
341
+ disabled?: boolean;
342
+ autoUpload?: boolean;
343
+ retryAttempts?: number;
344
+ placeholder?: string;
345
+ error?: string;
346
+ children?: React.ReactNode;
347
+ showFileList?: boolean;
348
+ FileListComponent?: (props: {
349
+ files: UploadedFile[];
350
+ onRemove: (index: number) => void;
351
+ }) => React.ReactNode;
352
+ files?: UploadedFile[];
353
+ };
354
+ declare const FileUploader: ({
355
+ onUpload,
356
+ onUploadStart,
357
+ onUploadProgress,
358
+ onUploadComplete,
359
+ onUploadError,
360
+ onFilesChange,
361
+ onRemove,
362
+ accept,
363
+ multiple,
364
+ maxSize,
365
+ maxFiles,
366
+ disabled,
367
+ autoUpload,
368
+ retryAttempts,
369
+ placeholder,
370
+ error,
371
+ children,
372
+ showFileList,
373
+ FileListComponent,
374
+ files: uploadedFiles
375
+ }: FileUploaderProps) => import("react/jsx-runtime").JSX.Element;
376
+ //#endregion
377
+ //#region src/components/InstallPwa/InstallPwa.d.ts
378
+ type InstallPwaUiProps = {
379
+ onInstall: React.MouseEventHandler<HTMLButtonElement>;
380
+ };
381
+ declare const InstallPwaUi: ({
382
+ onInstall
383
+ }: InstallPwaUiProps) => import("react/jsx-runtime").JSX.Element;
384
+ declare const InstallPwa: () => import("react/jsx-runtime").JSX.Element | null;
385
+ //#endregion
386
+ //#region src/components/List/List.d.ts
387
+ interface ListProps extends React.HTMLProps<HTMLUListElement> {
388
+ children: React.ReactNode;
389
+ }
390
+ declare const List: React.ForwardRefExoticComponent<Omit<ListProps, "ref"> & React.RefAttributes<HTMLUListElement>>;
391
+ //#endregion
392
+ //#region src/components/List/ListItem.d.ts
393
+ interface ListItemProps extends React.HTMLProps<HTMLLIElement> {
394
+ children: React.ReactNode;
395
+ }
396
+ declare const ListItem: React.ForwardRefExoticComponent<Omit<ListItemProps, "ref"> & React.RefAttributes<HTMLLIElement>>;
397
+ //#endregion
398
+ //#region src/components/LockedOverlay/LockedOverlay.d.ts
399
+ type LockedOverlayAction = {
400
+ /**
401
+ * Label text for the button
402
+ */
403
+ label: string;
404
+ /**
405
+ * Icon identifier from @ttoss/react-icons
406
+ */
407
+ icon?: string;
408
+ /**
409
+ * Button variant
410
+ */
411
+ variant: 'primary' | 'accent' | 'secondary';
412
+ /**
413
+ * Click handler for the button
414
+ */
415
+ onClick: () => void;
416
+ };
417
+ type LockedOverlayProps = {
418
+ /**
419
+ * Controls the overlay visibility
420
+ */
421
+ isOpen: boolean;
422
+ /**
423
+ * Optional close handler. If not provided, overlay cannot be closed by user interaction
424
+ */
425
+ onRequestClose?: () => void;
426
+ /**
427
+ * Header configuration for the SpotlightCard
428
+ */
429
+ header: {
430
+ /**
431
+ * Icon identifier from @ttoss/react-icons
432
+ */
433
+ icon: string;
434
+ /**
435
+ * Title text for the header
436
+ */
437
+ title: string;
438
+ /**
439
+ * Description text for the header
440
+ */
441
+ description: string;
442
+ /**
443
+ * Visual variant for the SpotlightCard
444
+ * @default 'primary'
445
+ */
446
+ variant?: 'primary' | 'accent';
447
+ };
448
+ /**
449
+ * Optional first button to display in the SpotlightCard header
450
+ */
451
+ firstButton?: ButtonProps | React.ReactNode;
452
+ /**
453
+ * Optional second button to display in the SpotlightCard header
454
+ */
455
+ secondButton?: ButtonProps | React.ReactNode;
456
+ /**
457
+ * Content to be rendered in the overlay body
458
+ */
459
+ children: React.ReactNode;
460
+ /**
461
+ * Optional list of actions to render as buttons in the footer
462
+ */
463
+ actions?: LockedOverlayAction[];
464
+ /**
465
+ * Optional style overrides for the overlay and content container
466
+ */
467
+ sx?: ThemeUIStyleObject<Theme<object>>;
468
+ /**
469
+ * Optional z-index value to control overlay stacking order.
470
+ * The overlay will appear above the parent container content.
471
+ * @default 1
472
+ *
473
+ * zIndex hierarchy reference:
474
+ * - modal: 1400
475
+ * - overlay: 1300 (sidebar layouts use this value)
476
+ * - dropdown: 1000
477
+ * - sticky: 1100
478
+ * - banner: 1200
479
+ */
480
+ zIndex?: string | number;
481
+ };
482
+ /**
483
+ * LockedOverlay is a component for blocking and displaying locked features or restricted content
484
+ * within a specific container.
485
+ *
486
+ * This component renders as an absolutely positioned overlay that blocks the parent container's content.
487
+ * The parent container must have `position: relative` for proper positioning.
488
+ *
489
+ * Unlike a modal, this component blocks only its parent container, not the entire viewport,
490
+ * making it ideal for blocking specific sections like Layout.Main, Layout.Main.Body, etc.
491
+ *
492
+ * @example
493
+ * ```tsx
494
+ * // Parent container must have position: relative
495
+ * <Layout.Main sx={{ position: 'relative' }}>
496
+ * <LockedOverlay
497
+ * isOpen={isOpen}
498
+ * onRequestClose={() => setIsOpen(false)}
499
+ * header={{
500
+ * icon: "fluent:lock-closed-24-filled",
501
+ * title: "Premium Feature",
502
+ * description: "Available in Pro plan only",
503
+ * variant: "primary"
504
+ * }}
505
+ * actions={[
506
+ * {
507
+ * label: "Upgrade Now",
508
+ * icon: "fluent-emoji-high-contrast:sparkles",
509
+ * variant: "primary",
510
+ * onClick: handleUpgrade
511
+ * },
512
+ * {
513
+ * label: "Learn More",
514
+ * icon: "fluent:arrow-right-16-regular",
515
+ * variant: "accent",
516
+ * onClick: handleLearnMore
517
+ * }
518
+ * ]}
519
+ * >
520
+ * <Text>This feature is only available for Pro users.</Text>
521
+ * </LockedOverlay>
522
+ * </Layout.Main>
523
+ * ```
524
+ *
525
+ * @example
526
+ * ```tsx
527
+ * // Blocking a specific section with custom zIndex
528
+ * <Box sx={{ position: 'relative' }}>
529
+ * <LockedOverlay
530
+ * isOpen={isOpen}
531
+ * zIndex={10}
532
+ * header={{
533
+ * icon: "fluent:lock-closed-24-filled",
534
+ * title: "Feature Locked",
535
+ * description: "Unlock this feature"
536
+ * }}
537
+ * >
538
+ * <Text>Content here</Text>
539
+ * </LockedOverlay>
540
+ * </Box>
541
+ * ```
542
+ */
543
+ declare const LockedOverlay: ({
544
+ isOpen,
545
+ onRequestClose,
546
+ header,
547
+ firstButton,
548
+ secondButton,
549
+ children,
550
+ actions,
551
+ sx,
552
+ zIndex
553
+ }: LockedOverlayProps) => import("react/jsx-runtime").JSX.Element | null;
554
+ //#endregion
555
+ //#region src/components/Markdown/Markdown.d.ts
556
+ type MarkdownProps = Options & {
557
+ children: string;
558
+ sx?: FlexProps['sx'];
559
+ };
560
+ declare const Markdown: ({
561
+ children,
562
+ sx,
563
+ ...props
564
+ }: MarkdownProps) => import("react/jsx-runtime").JSX.Element;
565
+ //#endregion
566
+ //#region src/components/Menu/Menu.d.ts
567
+ type MenuProps = {
568
+ children: React.ReactNode;
569
+ sx?: Record<string, unknown>;
570
+ menuIcon?: string;
571
+ };
572
+ declare const Menu: ({
573
+ children,
574
+ sx,
575
+ menuIcon
576
+ }: MenuProps) => import("react/jsx-runtime").JSX.Element;
577
+ //#endregion
578
+ //#region src/components/MetricCard/MetricCard.types.d.ts
579
+ /**
580
+ * Base metric properties shared by all metric types.
581
+ */
582
+ interface BaseMetric {
583
+ /**
584
+ * Label displayed above the metric value.
585
+ */
586
+ label: string;
587
+ /**
588
+ * Optional tooltip text or action handler for additional context.
589
+ * When a string is provided, it displays a simple tooltip.
590
+ * When a function is provided, it's called when the tooltip icon is clicked.
591
+ */
592
+ tooltip?: string | (() => void);
593
+ /**
594
+ * Icon to display alongside the metric.
595
+ */
596
+ icon?: IconType;
597
+ /**
598
+ * Optional click handler to make the metric card interactive.
599
+ */
600
+ onClick?: () => void;
601
+ /**
602
+ * Optional help article action handler.
603
+ */
604
+ helpArticleAction?: () => void;
605
+ }
606
+ /**
607
+ * Date-based metric for displaying dates like expiration or renewal.
608
+ */
609
+ interface DateMetric extends BaseMetric {
610
+ type: 'date';
611
+ /**
612
+ * The date value to display.
613
+ */
614
+ date: string;
615
+ /**
616
+ * Optional message showing remaining days.
617
+ */
618
+ remainingDaysMessage?: string;
619
+ /**
620
+ * Whether to show a warning indicator.
621
+ */
622
+ isWarning?: boolean;
623
+ }
624
+ /**
625
+ * Percentage-based metric with progress bar.
626
+ */
627
+ interface PercentageMetric extends BaseMetric {
628
+ type: 'percentage';
629
+ /**
630
+ * Current value.
631
+ */
632
+ current: number;
633
+ /**
634
+ * Maximum value. Use null for unlimited.
635
+ */
636
+ max: number | null;
637
+ /**
638
+ * Custom formatter for displaying values.
639
+ */
640
+ formatValue?: (value: number) => string;
641
+ /**
642
+ * Percentage threshold at which to show an alert.
643
+ */
644
+ showAlertThreshold?: number;
645
+ }
646
+ /**
647
+ * Number-based metric for displaying counts.
648
+ */
649
+ interface NumberMetric extends BaseMetric {
650
+ type: 'number';
651
+ /**
652
+ * Current value.
653
+ */
654
+ current: number;
655
+ /**
656
+ * Maximum value. Use null for unlimited.
657
+ */
658
+ max: number | null;
659
+ /**
660
+ * Custom formatter for displaying values.
661
+ */
662
+ formatValue?: (value: number) => string;
663
+ /**
664
+ * Optional footer text below the metric.
665
+ */
666
+ footerText?: string;
667
+ }
668
+ /**
669
+ * Union type for all supported metric types.
670
+ */
671
+ type Metric = DateMetric | PercentageMetric | NumberMetric;
672
+ /**
673
+ * Props for the MetricCard component.
674
+ */
675
+ interface MetricCardProps {
676
+ /**
677
+ * The metric configuration to display.
678
+ */
679
+ metric: Metric;
680
+ /**
681
+ * Whether the card is in loading state.
682
+ */
683
+ isLoading?: boolean;
684
+ }
685
+ //#endregion
686
+ //#region src/components/MetricCard/MetricCard.d.ts
687
+ /**
688
+ * MetricCard component displays a metric in a consistent card layout.
689
+ *
690
+ * It supports three metric types:
691
+ * - **date**: displays a date and optional remaining-days message
692
+ * - **percentage**: displays current/max values and a progress bar
693
+ * - **number**: displays current/max values and an optional footer text
694
+ *
695
+ * @example
696
+ * ```tsx
697
+ * <MetricCard
698
+ * metric={{
699
+ * type: 'date',
700
+ * label: 'Renewal date',
701
+ * date: '31/12/2025',
702
+ * icon: 'fluent:calendar-24-regular',
703
+ * remainingDaysMessage: '10 days remaining',
704
+ * }}
705
+ * />
706
+ * ```
707
+ *
708
+ * @example
709
+ * ```tsx
710
+ * <MetricCard
711
+ * metric={{
712
+ * type: 'percentage',
713
+ * label: 'Plan usage',
714
+ * current: 350,
715
+ * max: 1000,
716
+ * icon: 'fluent:gauge-24-regular',
717
+ * showAlertThreshold: 80,
718
+ * }}
719
+ * />
720
+ * ```
721
+ */
722
+ declare const MetricCard: ({
723
+ metric,
724
+ isLoading
725
+ }: MetricCardProps) => import("react/jsx-runtime").JSX.Element | null;
726
+ //#endregion
727
+ //#region src/components/Modal/Modal.d.ts
728
+ type ModalProps = ReactModal.Props;
729
+ declare const Modal: {
730
+ (props: ModalProps): import("react/jsx-runtime").JSX.Element;
731
+ setAppElement: typeof ReactModal.setAppElement;
732
+ };
733
+ //#endregion
734
+ //#region src/components/NavList/NavList.d.ts
735
+ type NavListItem = {
736
+ id?: string;
737
+ label: string;
738
+ href: string;
739
+ icon?: string;
740
+ disabled?: boolean;
741
+ active?: boolean;
742
+ onClick?: (event: React.MouseEvent<HTMLAnchorElement>) => void;
743
+ group?: string;
744
+ divider?: boolean;
745
+ };
746
+ type NavListGroup = {
747
+ id?: string;
748
+ label?: string;
749
+ items: NavListItem[];
750
+ divider?: boolean;
751
+ };
752
+ type LinkComponentProps = {
753
+ href: string;
754
+ onClick?: (event: React.MouseEvent<HTMLAnchorElement>) => void;
755
+ children: React.ReactNode;
756
+ [key: string]: unknown;
757
+ };
758
+ type NavListProps = {
759
+ items?: NavListItem[];
760
+ groups?: NavListGroup[];
761
+ variant?: 'sidebar' | 'menu' | 'dropdown';
762
+ onItemClick?: (item: NavListItem) => void;
763
+ sx?: Record<string, unknown>;
764
+ iconSize?: number;
765
+ /**
766
+ * Custom Link component to use for rendering links.
767
+ * Useful for integrating with Next.js Link, React Router Link, etc.
768
+ *
769
+ * @example
770
+ * // Next.js
771
+ * import NextLink from 'next/link';
772
+ * <NavList LinkComponent={NextLink} ... />
773
+ *
774
+ * @example
775
+ * // React Router
776
+ * import { Link as RouterLink } from 'react-router-dom';
777
+ * <NavList LinkComponent={RouterLink} ... />
778
+ */
779
+ LinkComponent?: React.ComponentType<LinkComponentProps>;
780
+ };
781
+ declare const NavList: {
782
+ ({
783
+ items,
784
+ groups,
785
+ variant,
786
+ onItemClick,
787
+ sx,
788
+ iconSize,
789
+ LinkComponent
790
+ }: NavListProps): import("react/jsx-runtime").JSX.Element;
791
+ displayName: string;
792
+ };
793
+ //#endregion
794
+ //#region src/components/NotificationCard/NotificationCard.d.ts
795
+ type NotificationType = 'success' | 'error' | 'warning' | 'info' | 'neutral';
796
+ type NotificationAction = {
797
+ action?: 'open_url';
798
+ url?: string;
799
+ label?: string;
800
+ };
801
+ type NotificationCardProps = {
802
+ type: NotificationType;
803
+ title?: string | React.ReactNode;
804
+ message: string | React.ReactNode;
805
+ actions?: NotificationAction[];
806
+ caption?: string | React.ReactNode;
807
+ tags?: string[] | React.ReactNode;
808
+ onClose?: () => void;
809
+ };
810
+ declare const NotificationCard: (props: NotificationCardProps) => import("react/jsx-runtime").JSX.Element;
811
+ //#endregion
812
+ //#region src/components/NotificationsMenu/NotificationsMenu.d.ts
813
+ type Notification = NotificationCardProps & {
814
+ id: string;
815
+ group?: string;
816
+ };
817
+ type Props = {
818
+ notifications: Notification[];
819
+ defaultOpen?: boolean;
820
+ hasMore?: boolean;
821
+ count: number;
822
+ onLoadMore?: () => void;
823
+ onOpenChange?: (isOpen: boolean) => void;
824
+ onClose?: () => void;
825
+ onClearAll?: () => void;
826
+ };
827
+ declare const NotificationsMenu: ({
828
+ notifications,
829
+ defaultOpen,
830
+ hasMore,
831
+ onLoadMore,
832
+ onOpenChange,
833
+ count,
834
+ onClose,
835
+ onClearAll
836
+ }: Props) => import("react/jsx-runtime").JSX.Element;
837
+ //#endregion
838
+ //#region src/components/Search/Search.d.ts
839
+ type SearchProps = Omit<InputProps, 'onChange'> & {
840
+ loading?: boolean;
841
+ debounce?: number;
842
+ onChange: (value?: InputProps['value']) => void;
843
+ };
844
+ declare const Search: ({
845
+ value,
846
+ defaultValue,
847
+ loading,
848
+ onChange,
849
+ ...props
850
+ }: SearchProps) => import("react/jsx-runtime").JSX.Element;
851
+ //#endregion
852
+ //#region src/components/SpotlightCard/SpotlightCard.d.ts
853
+ type ButtonPropType = ButtonProps | React.ReactNode;
854
+ type SpotlightCardProps = {
855
+ icon: IconType;
856
+ /**
857
+ * Title of the card. Pass a ReactNode for styling.
858
+ */
859
+ title: string | React.ReactNode;
860
+ /**
861
+ * Badge text. Renders as a badge/tag next to the title.
862
+ */
863
+ badge?: string | React.ReactNode;
864
+ description: string;
865
+ firstButton?: ButtonPropType;
866
+ secondButton?: ButtonPropType;
867
+ variant?: 'accent' | 'primary';
868
+ };
869
+ declare const SpotlightCard: {
870
+ ({
871
+ icon,
872
+ title,
873
+ badge,
874
+ description,
875
+ firstButton,
876
+ secondButton,
877
+ variant
878
+ }: SpotlightCardProps): import("react/jsx-runtime").JSX.Element;
879
+ displayName: string;
880
+ };
881
+ //#endregion
882
+ //#region src/components/Table/Table.d.ts
883
+ declare const Table: {
884
+ (props: BoxProps): import("react/jsx-runtime").JSX.Element;
885
+ Head: (props: BoxProps) => import("react/jsx-runtime").JSX.Element;
886
+ Body: (props: BoxProps) => import("react/jsx-runtime").JSX.Element;
887
+ Row: (props: BoxProps) => import("react/jsx-runtime").JSX.Element;
888
+ Cell: (props: BoxProps) => import("react/jsx-runtime").JSX.Element;
889
+ Header: (props: BoxProps) => import("react/jsx-runtime").JSX.Element;
890
+ Caption: (props: BoxProps) => import("react/jsx-runtime").JSX.Element;
891
+ Footer: (props: BoxProps) => import("react/jsx-runtime").JSX.Element;
892
+ };
893
+ //#endregion
894
+ //#region src/components/Tabs/Tabs.d.ts
895
+ declare const Tabs: {
896
+ (props: BoxProps & TabsProps): import("react/jsx-runtime").JSX.Element;
897
+ TabList: import("react").FunctionComponent<TabListProps>;
898
+ /**
899
+ * Tab default props
900
+ * https://github.com/reactjs/react-tabs/blob/main/src/components/Tab.js
901
+ */
902
+ Tab: import("react").FunctionComponent<TabProps>;
903
+ TabPanel: import("react").FunctionComponent<TabPanelProps>;
904
+ };
905
+ //#endregion
906
+ //#region src/components/Toast/Toast.d.ts
907
+ declare const ToastContainer: (props: ToastContainerProps) => import("react/jsx-runtime").JSX.Element;
908
+ declare const toast: typeof toast$1;
909
+ //#endregion
910
+ export { Accordion, AccordionItem, AccordionProps, AccordionRenderItemProps, BaseMetric, DateMetric, DatePicker, DateRange, Drawer, DrawerProps, EnhancedTitle, EnhancedTitleBadge, EnhancedTitleProps, EnhancedTitleVariant, FileUploadState, FileUploader, FileUploaderProps, InstallPwa, InstallPwaUi, InstallPwaUiProps, JsonEditor, JsonView, type LinkComponentProps, List, ListItem, ListItemProps, ListProps, LockedOverlay, Markdown, MarkdownProps, Menu, MenuProps, Metric, MetricCard, MetricCardProps, Modal, ModalProps, NavList, type NavListGroup, type NavListItem, type NavListProps, Notification, NotificationAction, NotificationCard, NotificationCardProps, NotificationsMenu, NumberMetric, OnFilesChange, OnRemove, OnUpload, OnUploadComplete, OnUploadError, OnUploadProgress, OnUploadStart, PercentageMetric, Search, SearchProps, SpotlightCard, SpotlightCardProps, type TabListProps, type TabPanelProps, type TabProps, Table, Tabs, type TabsProps, ToastContainer, type ToastContainerProps, type ToastOptions, UploadResult, UploadedFile, createCell, createColumnHelper, flexRender, getCoreRowModel, toast, useReactTable };