@northslopetech/altitude-ui 2.7.0 → 2.8.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/index.d.mts +117 -87
- package/dist/index.d.ts +117 -87
- package/dist/index.js +615 -617
- package/dist/index.mjs +561 -557
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
|
+
import { Button as Button$1 } from '@base-ui/react/button';
|
|
4
5
|
import { VariantProps } from 'class-variance-authority';
|
|
5
6
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
6
7
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
@@ -11,27 +12,22 @@ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
|
11
12
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
12
13
|
import { Table as Table$1 } from '@tanstack/react-table';
|
|
13
14
|
|
|
14
|
-
/**
|
|
15
|
-
* Button variant styles.
|
|
16
|
-
*/
|
|
17
15
|
declare const buttonVariants: (props?: ({
|
|
18
16
|
variant?: "default" | "outline" | "destructive" | "destructive-subtle" | "ghost" | "link" | null | undefined;
|
|
19
17
|
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
20
18
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
21
|
-
interface ButtonProps extends
|
|
22
|
-
asChild?: boolean;
|
|
19
|
+
interface ButtonProps extends Button$1.Props, VariantProps<typeof buttonVariants> {
|
|
23
20
|
icon?: React$1.ReactNode;
|
|
24
21
|
iconPosition?: "left" | "right";
|
|
25
22
|
}
|
|
26
23
|
/**
|
|
27
24
|
* Button component with multiple variants and sizes.
|
|
28
|
-
* @param {boolean} [props.asChild] - Render as child element (using Radix Slot)
|
|
29
25
|
* @param {React.ReactNode} [props.icon] - Icon element to display
|
|
30
26
|
* @param {"left" | "right"} [props.iconPosition] - Position of icon relative to text
|
|
31
27
|
* @param {string} [props.variant] - Visual style variant
|
|
32
28
|
* @param {string} [props.size] - Button size
|
|
33
29
|
*/
|
|
34
|
-
declare const Button: React$1.ForwardRefExoticComponent<ButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
30
|
+
declare const Button: React$1.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
35
31
|
|
|
36
32
|
/**
|
|
37
33
|
* Typography variant styles using design system tokens.
|
|
@@ -346,6 +342,22 @@ declare const Badge: React$1.ForwardRefExoticComponent<BadgeProps & React$1.RefA
|
|
|
346
342
|
* PDF file input type - can be a URL string or File object.
|
|
347
343
|
*/
|
|
348
344
|
type PdfFile = string | File;
|
|
345
|
+
/**
|
|
346
|
+
* Dimensions of a single PDF page at scale 1.0.
|
|
347
|
+
*/
|
|
348
|
+
type PdfPageDimensions = {
|
|
349
|
+
/** Page number (1-indexed) */
|
|
350
|
+
pageNumber: number;
|
|
351
|
+
/** Width in PDF units at scale 1.0 */
|
|
352
|
+
width: number;
|
|
353
|
+
/** Height in PDF units at scale 1.0 */
|
|
354
|
+
height: number;
|
|
355
|
+
};
|
|
356
|
+
/**
|
|
357
|
+
* Map of page numbers to their dimensions.
|
|
358
|
+
* Key is 1-indexed page number.
|
|
359
|
+
*/
|
|
360
|
+
type PdfPageDimensionsMap = Map<number, PdfPageDimensions>;
|
|
349
361
|
/**
|
|
350
362
|
* Scroll behavior when navigating to a page.
|
|
351
363
|
* - 'smooth': Animate scrolling to the target page
|
|
@@ -361,7 +373,7 @@ type PdfViewMode = "continuous" | "single";
|
|
|
361
373
|
/**
|
|
362
374
|
* Props for PDF viewer components.
|
|
363
375
|
*/
|
|
364
|
-
|
|
376
|
+
type PdfViewerProps = Omit<React.HTMLAttributes<HTMLDivElement>, "onError"> & {
|
|
365
377
|
/**
|
|
366
378
|
* The PDF file to display. Can be a URL string or a File object.
|
|
367
379
|
*/
|
|
@@ -423,7 +435,23 @@ interface PdfViewerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onE
|
|
|
423
435
|
* - 'single': One page at a time with navigation
|
|
424
436
|
*/
|
|
425
437
|
viewMode?: PdfViewMode;
|
|
426
|
-
|
|
438
|
+
/**
|
|
439
|
+
* Callback fired when page dimensions have been fetched.
|
|
440
|
+
* Useful for bounding box implementations that need accurate page coordinates.
|
|
441
|
+
*
|
|
442
|
+
* @example
|
|
443
|
+
* ```tsx
|
|
444
|
+
* <PdfViewer
|
|
445
|
+
* file={pdfFile}
|
|
446
|
+
* onDimensionsReady={(dimensions) => {
|
|
447
|
+
* const page1 = dimensions.get(1);
|
|
448
|
+
* console.log(`Page 1: ${page1.width}x${page1.height}`);
|
|
449
|
+
* }}
|
|
450
|
+
* />
|
|
451
|
+
* ```
|
|
452
|
+
*/
|
|
453
|
+
onDimensionsReady?: (dimensions: PdfPageDimensionsMap) => void;
|
|
454
|
+
};
|
|
427
455
|
|
|
428
456
|
/**
|
|
429
457
|
* @fileoverview PDF.js worker configuration.
|
|
@@ -454,11 +482,6 @@ interface PdfViewerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onE
|
|
|
454
482
|
*/
|
|
455
483
|
declare function initializePdfWorker(workerUrl: string): void;
|
|
456
484
|
|
|
457
|
-
/**
|
|
458
|
-
* @fileoverview PDF viewer component for Altitude UI.
|
|
459
|
-
* Uses virtualization for efficient rendering of large PDFs.
|
|
460
|
-
*/
|
|
461
|
-
|
|
462
485
|
/**
|
|
463
486
|
* PDF document viewer component with multi-page support.
|
|
464
487
|
*
|
|
@@ -497,7 +520,23 @@ declare function initializePdfWorker(workerUrl: string): void;
|
|
|
497
520
|
* />
|
|
498
521
|
* ```
|
|
499
522
|
*/
|
|
500
|
-
declare const PdfViewer: React$1.ForwardRefExoticComponent<
|
|
523
|
+
declare const PdfViewer: React$1.ForwardRefExoticComponent<Omit<React$1.HTMLAttributes<HTMLDivElement>, "onError"> & {
|
|
524
|
+
file?: PdfFile;
|
|
525
|
+
title?: string;
|
|
526
|
+
pageWidth?: number;
|
|
527
|
+
onDownload?: () => void;
|
|
528
|
+
onPrint?: () => void;
|
|
529
|
+
onLoadSuccess?: (numPages: number) => void;
|
|
530
|
+
onError?: (error: Error) => void;
|
|
531
|
+
enableTextLayer?: boolean;
|
|
532
|
+
showControls?: boolean;
|
|
533
|
+
viewportBuffer?: number;
|
|
534
|
+
page?: number;
|
|
535
|
+
onPageChange?: (page: number) => void;
|
|
536
|
+
scrollBehavior?: ScrollBehavior;
|
|
537
|
+
viewMode?: PdfViewMode;
|
|
538
|
+
onDimensionsReady?: (dimensions: PdfPageDimensionsMap) => void;
|
|
539
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
501
540
|
|
|
502
541
|
/**
|
|
503
542
|
* Tabs trigger variant styles.
|
|
@@ -578,91 +617,82 @@ interface IconProps extends React$1.SVGProps<SVGSVGElement> {
|
|
|
578
617
|
variant?: IconVariant;
|
|
579
618
|
}
|
|
580
619
|
/**
|
|
581
|
-
*
|
|
582
|
-
*/
|
|
583
|
-
declare const X: React$1.FC<IconProps>;
|
|
584
|
-
/**
|
|
585
|
-
* Lock icon component.
|
|
586
|
-
*/
|
|
587
|
-
declare const Lock: React$1.FC<IconProps>;
|
|
588
|
-
/**
|
|
589
|
-
* Check icon component (circle with checkmark).
|
|
590
|
-
*/
|
|
591
|
-
declare const Check: React$1.FC<IconProps>;
|
|
592
|
-
/**
|
|
593
|
-
* ChevronDown icon component (downward pointing chevron).
|
|
620
|
+
* LockIcon component.
|
|
594
621
|
*/
|
|
595
|
-
declare const
|
|
622
|
+
declare const LockIcon: React$1.FC<IconProps>;
|
|
596
623
|
/**
|
|
597
|
-
*
|
|
624
|
+
* CheckIcon component (circle with checkmark).
|
|
598
625
|
*/
|
|
599
|
-
declare const ChevronUp: React$1.FC<IconProps>;
|
|
600
|
-
declare const Calendar: React$1.FC<IconProps>;
|
|
601
|
-
declare const ChevronLeft: React$1.FC<IconProps>;
|
|
602
|
-
declare const ChevronRight: React$1.FC<IconProps>;
|
|
603
626
|
declare const CheckIcon: React$1.FC<IconProps>;
|
|
604
|
-
declare const
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
declare const
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
declare const
|
|
613
|
-
declare const
|
|
614
|
-
declare const
|
|
615
|
-
declare const
|
|
616
|
-
declare const
|
|
617
|
-
declare const
|
|
618
|
-
declare const
|
|
619
|
-
declare const
|
|
620
|
-
declare const
|
|
621
|
-
declare const
|
|
622
|
-
declare const
|
|
623
|
-
declare const
|
|
624
|
-
declare const
|
|
625
|
-
declare const
|
|
626
|
-
declare const
|
|
627
|
-
declare const
|
|
628
|
-
declare const
|
|
629
|
-
declare const
|
|
630
|
-
declare const
|
|
631
|
-
declare const
|
|
632
|
-
declare const
|
|
633
|
-
declare const
|
|
634
|
-
declare const
|
|
635
|
-
declare const
|
|
636
|
-
declare const
|
|
637
|
-
declare const
|
|
638
|
-
declare const
|
|
639
|
-
declare const
|
|
640
|
-
declare const
|
|
641
|
-
declare const
|
|
642
|
-
declare const
|
|
643
|
-
declare const
|
|
644
|
-
declare const
|
|
645
|
-
declare const
|
|
646
|
-
declare const
|
|
627
|
+
declare const CalendarIcon: React$1.FC<IconProps>;
|
|
628
|
+
/**
|
|
629
|
+
* CheckmarkIcon (just the checkmark) component.
|
|
630
|
+
*/
|
|
631
|
+
declare const CheckmarkIcon: React$1.FC<IconProps>;
|
|
632
|
+
/**
|
|
633
|
+
* ArrowDownIcon component.
|
|
634
|
+
*/
|
|
635
|
+
declare const ArrowDownIcon: React$1.FC<IconProps>;
|
|
636
|
+
declare const ArrowUpIcon: React$1.FC<IconProps>;
|
|
637
|
+
declare const ArrowLeftIcon: React$1.FC<IconProps>;
|
|
638
|
+
declare const ArrowRightIcon: React$1.FC<IconProps>;
|
|
639
|
+
declare const BellIcon: React$1.FC<IconProps>;
|
|
640
|
+
declare const BookmarkIcon: React$1.FC<IconProps>;
|
|
641
|
+
declare const CaretDownIcon: React$1.FC<IconProps>;
|
|
642
|
+
declare const CaretLeftIcon: React$1.FC<IconProps>;
|
|
643
|
+
declare const CaretRightIcon: React$1.FC<IconProps>;
|
|
644
|
+
declare const CaretUpIcon: React$1.FC<IconProps>;
|
|
645
|
+
declare const ChatIcon: React$1.FC<IconProps>;
|
|
646
|
+
declare const CheckmarkSquareIcon: React$1.FC<IconProps>;
|
|
647
|
+
declare const CloseIcon: React$1.FC<IconProps>;
|
|
648
|
+
declare const CloseSmallIcon: React$1.FC<IconProps>;
|
|
649
|
+
declare const CogIcon: React$1.FC<IconProps>;
|
|
650
|
+
declare const CredentialsIcon: React$1.FC<IconProps>;
|
|
651
|
+
declare const DocumentIcon: React$1.FC<IconProps>;
|
|
652
|
+
declare const DollarIcon: React$1.FC<IconProps>;
|
|
653
|
+
declare const EditIcon: React$1.FC<IconProps>;
|
|
654
|
+
declare const EnvelopeIcon: React$1.FC<IconProps>;
|
|
655
|
+
declare const ExclamationIcon: React$1.FC<IconProps>;
|
|
656
|
+
declare const EyeClosedIcon: React$1.FC<IconProps>;
|
|
657
|
+
declare const EyeOpenIcon: React$1.FC<IconProps>;
|
|
658
|
+
declare const FilterIcon: React$1.FC<IconProps>;
|
|
659
|
+
declare const FilterDescendingIcon: React$1.FC<IconProps>;
|
|
660
|
+
declare const GraphBarIcon: React$1.FC<IconProps>;
|
|
661
|
+
declare const GraphDonutIcon: React$1.FC<IconProps>;
|
|
662
|
+
declare const GraphLineIcon: React$1.FC<IconProps>;
|
|
663
|
+
declare const GraphPieIcon: React$1.FC<IconProps>;
|
|
664
|
+
declare const HamburgerMenuIcon: React$1.FC<IconProps>;
|
|
665
|
+
declare const HomeIcon: React$1.FC<IconProps>;
|
|
666
|
+
declare const InformationIcon: React$1.FC<IconProps>;
|
|
667
|
+
declare const LocationIcon: React$1.FC<IconProps>;
|
|
668
|
+
declare const MagnifyingGlassIcon: React$1.FC<IconProps>;
|
|
669
|
+
declare const MinusIcon: React$1.FC<IconProps>;
|
|
670
|
+
declare const PlusIcon: React$1.FC<IconProps>;
|
|
671
|
+
declare const MoreMenuIcon: React$1.FC<IconProps>;
|
|
672
|
+
declare const PhoneIcon: React$1.FC<IconProps>;
|
|
673
|
+
declare const QuestionCircleIcon: React$1.FC<IconProps>;
|
|
674
|
+
declare const ShareIcon: React$1.FC<IconProps>;
|
|
675
|
+
declare const StarIcon: React$1.FC<IconProps>;
|
|
676
|
+
declare const StatementIcon: React$1.FC<IconProps>;
|
|
647
677
|
declare const TableIcon: React$1.FC<IconProps>;
|
|
648
|
-
declare const
|
|
649
|
-
declare const
|
|
650
|
-
declare const
|
|
651
|
-
declare const
|
|
652
|
-
declare const
|
|
653
|
-
declare const
|
|
678
|
+
declare const TrashIcon: React$1.FC<IconProps>;
|
|
679
|
+
declare const UserIcon: React$1.FC<IconProps>;
|
|
680
|
+
declare const UserMultiIcon: React$1.FC<IconProps>;
|
|
681
|
+
declare const WarningIcon: React$1.FC<IconProps>;
|
|
682
|
+
declare const WrenchIcon: React$1.FC<IconProps>;
|
|
683
|
+
declare const LogoutIcon: React$1.FC<IconProps>;
|
|
654
684
|
/**
|
|
655
685
|
* Print icon component.
|
|
656
686
|
*/
|
|
657
|
-
declare const
|
|
687
|
+
declare const PrintIcon: React$1.FC<IconProps>;
|
|
658
688
|
/**
|
|
659
689
|
* Download icon component.
|
|
660
690
|
*/
|
|
661
|
-
declare const
|
|
691
|
+
declare const DownloadIcon: React$1.FC<IconProps>;
|
|
662
692
|
/**
|
|
663
693
|
* Panel icon component.
|
|
664
694
|
*/
|
|
665
|
-
declare const
|
|
695
|
+
declare const PanelIcon: React$1.FC<IconProps>;
|
|
666
696
|
|
|
667
697
|
/**
|
|
668
698
|
* @fileoverview Chart utilities for Altitude UI chart components.
|
|
@@ -1173,4 +1203,4 @@ interface TableProps<T> {
|
|
|
1173
1203
|
*/
|
|
1174
1204
|
declare function Table<T>({ table, className, showPagination, paginationClassName, }: TableProps<T>): react_jsx_runtime.JSX.Element;
|
|
1175
1205
|
|
|
1176
|
-
export {
|
|
1206
|
+
export { ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, Badge, type BadgeProps, BarChart, type BarChartData, type BarChartProps, BellIcon, BookmarkIcon, Button, type ButtonProps, CHART_COLORS, CHART_CONSTANTS, COLOR_SCHEMES, CalendarIcon, CaretDownIcon, CaretLeftIcon, CaretRightIcon, CaretUpIcon, type ChartColorScheme, ChartLegend, type ChartLegendProps, ChatIcon, CheckIcon, Checkbox, type CheckboxProps, CheckmarkIcon, CheckmarkSquareIcon, CloseIcon, CloseSmallIcon, CogIcon, CredentialsIcon, DatePicker, type DatePickerProps, DocumentIcon, DollarIcon, DownloadIcon, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type DropdownMenuTriggerProps, EditIcon, EnvelopeIcon, ExclamationIcon, EyeClosedIcon, EyeOpenIcon, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, FilterDescendingIcon, FilterIcon, GenericTooltip, type GenericTooltipProps, GraphBarIcon, GraphDonutIcon, GraphLineIcon, GraphPieIcon, HamburgerMenuIcon, HomeIcon, type IconProps, type IconVariant, InformationIcon, Input, type InputProps, Label, type LabelProps, type LegendItem, LineChart, type LineChartData, type LineChartProps, type LineSeries, LocationIcon, LockIcon, LogoutIcon, MagnifyingGlassIcon, MinusIcon, MoreMenuIcon, PanelIcon, type PdfFile, PdfViewer, type PdfViewerProps, PhoneIcon, PieChart, type PieChartData, type PieChartProps, type PieLabelProps, PlusIcon, PrintIcon, QuestionCircleIcon, Select, SelectContent, type SelectContentProps, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, type SelectTriggerProps, SelectValue, Separator, ShareIcon, Sidebar, SidebarContent, type SidebarContentProps, SidebarFooter, type SidebarFooterProps, SidebarGroup, SidebarGroupContent, type SidebarGroupContentProps, type SidebarGroupProps, SidebarHeader, type SidebarHeaderProps, SidebarInset, type SidebarInsetProps, SidebarMenu, SidebarMenuButton, type SidebarMenuButtonProps, SidebarMenuItem, type SidebarMenuItemProps, type SidebarMenuProps, type SidebarProps, SidebarProvider, type SidebarProviderProps, StarIcon, StatementIcon, Table, TableIcon, type TableProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, Textarea, type TextareaProps, type TickProps, Tooltip, TooltipContainer, type TooltipContainerProps, TooltipContent, type TooltipContentProps, TooltipItem, type TooltipItemProps, type TooltipProps, TooltipProvider, type TooltipProviderProps, TooltipTrigger, type TooltipTriggerProps, TrashIcon, Typography, type TypographyProps, Upload, type UploadProps, UserIcon, UserMultiIcon, WarningIcon, WrenchIcon, badgeVariants, buttonVariants, calculateYAxisWidth, checkboxVariants, createCustomXAxisLabel, createCustomYAxisLabel, createCustomYAxisRightLabel, createLegendItems, customXAxisTick, customXAxisTickRotated, customYAxisTick, formatLargeNumber, formatPercentage, getHeatmapColor, getPerformanceColor, getSeriesColor, initializePdfWorker, selectTriggerVariants, tabsVariants, typographyVariants, uploadVariants, useSidebar };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
|
+
import { Button as Button$1 } from '@base-ui/react/button';
|
|
4
5
|
import { VariantProps } from 'class-variance-authority';
|
|
5
6
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
6
7
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
@@ -11,27 +12,22 @@ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
|
11
12
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
12
13
|
import { Table as Table$1 } from '@tanstack/react-table';
|
|
13
14
|
|
|
14
|
-
/**
|
|
15
|
-
* Button variant styles.
|
|
16
|
-
*/
|
|
17
15
|
declare const buttonVariants: (props?: ({
|
|
18
16
|
variant?: "default" | "outline" | "destructive" | "destructive-subtle" | "ghost" | "link" | null | undefined;
|
|
19
17
|
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
20
18
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
21
|
-
interface ButtonProps extends
|
|
22
|
-
asChild?: boolean;
|
|
19
|
+
interface ButtonProps extends Button$1.Props, VariantProps<typeof buttonVariants> {
|
|
23
20
|
icon?: React$1.ReactNode;
|
|
24
21
|
iconPosition?: "left" | "right";
|
|
25
22
|
}
|
|
26
23
|
/**
|
|
27
24
|
* Button component with multiple variants and sizes.
|
|
28
|
-
* @param {boolean} [props.asChild] - Render as child element (using Radix Slot)
|
|
29
25
|
* @param {React.ReactNode} [props.icon] - Icon element to display
|
|
30
26
|
* @param {"left" | "right"} [props.iconPosition] - Position of icon relative to text
|
|
31
27
|
* @param {string} [props.variant] - Visual style variant
|
|
32
28
|
* @param {string} [props.size] - Button size
|
|
33
29
|
*/
|
|
34
|
-
declare const Button: React$1.ForwardRefExoticComponent<ButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
30
|
+
declare const Button: React$1.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
35
31
|
|
|
36
32
|
/**
|
|
37
33
|
* Typography variant styles using design system tokens.
|
|
@@ -346,6 +342,22 @@ declare const Badge: React$1.ForwardRefExoticComponent<BadgeProps & React$1.RefA
|
|
|
346
342
|
* PDF file input type - can be a URL string or File object.
|
|
347
343
|
*/
|
|
348
344
|
type PdfFile = string | File;
|
|
345
|
+
/**
|
|
346
|
+
* Dimensions of a single PDF page at scale 1.0.
|
|
347
|
+
*/
|
|
348
|
+
type PdfPageDimensions = {
|
|
349
|
+
/** Page number (1-indexed) */
|
|
350
|
+
pageNumber: number;
|
|
351
|
+
/** Width in PDF units at scale 1.0 */
|
|
352
|
+
width: number;
|
|
353
|
+
/** Height in PDF units at scale 1.0 */
|
|
354
|
+
height: number;
|
|
355
|
+
};
|
|
356
|
+
/**
|
|
357
|
+
* Map of page numbers to their dimensions.
|
|
358
|
+
* Key is 1-indexed page number.
|
|
359
|
+
*/
|
|
360
|
+
type PdfPageDimensionsMap = Map<number, PdfPageDimensions>;
|
|
349
361
|
/**
|
|
350
362
|
* Scroll behavior when navigating to a page.
|
|
351
363
|
* - 'smooth': Animate scrolling to the target page
|
|
@@ -361,7 +373,7 @@ type PdfViewMode = "continuous" | "single";
|
|
|
361
373
|
/**
|
|
362
374
|
* Props for PDF viewer components.
|
|
363
375
|
*/
|
|
364
|
-
|
|
376
|
+
type PdfViewerProps = Omit<React.HTMLAttributes<HTMLDivElement>, "onError"> & {
|
|
365
377
|
/**
|
|
366
378
|
* The PDF file to display. Can be a URL string or a File object.
|
|
367
379
|
*/
|
|
@@ -423,7 +435,23 @@ interface PdfViewerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onE
|
|
|
423
435
|
* - 'single': One page at a time with navigation
|
|
424
436
|
*/
|
|
425
437
|
viewMode?: PdfViewMode;
|
|
426
|
-
|
|
438
|
+
/**
|
|
439
|
+
* Callback fired when page dimensions have been fetched.
|
|
440
|
+
* Useful for bounding box implementations that need accurate page coordinates.
|
|
441
|
+
*
|
|
442
|
+
* @example
|
|
443
|
+
* ```tsx
|
|
444
|
+
* <PdfViewer
|
|
445
|
+
* file={pdfFile}
|
|
446
|
+
* onDimensionsReady={(dimensions) => {
|
|
447
|
+
* const page1 = dimensions.get(1);
|
|
448
|
+
* console.log(`Page 1: ${page1.width}x${page1.height}`);
|
|
449
|
+
* }}
|
|
450
|
+
* />
|
|
451
|
+
* ```
|
|
452
|
+
*/
|
|
453
|
+
onDimensionsReady?: (dimensions: PdfPageDimensionsMap) => void;
|
|
454
|
+
};
|
|
427
455
|
|
|
428
456
|
/**
|
|
429
457
|
* @fileoverview PDF.js worker configuration.
|
|
@@ -454,11 +482,6 @@ interface PdfViewerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onE
|
|
|
454
482
|
*/
|
|
455
483
|
declare function initializePdfWorker(workerUrl: string): void;
|
|
456
484
|
|
|
457
|
-
/**
|
|
458
|
-
* @fileoverview PDF viewer component for Altitude UI.
|
|
459
|
-
* Uses virtualization for efficient rendering of large PDFs.
|
|
460
|
-
*/
|
|
461
|
-
|
|
462
485
|
/**
|
|
463
486
|
* PDF document viewer component with multi-page support.
|
|
464
487
|
*
|
|
@@ -497,7 +520,23 @@ declare function initializePdfWorker(workerUrl: string): void;
|
|
|
497
520
|
* />
|
|
498
521
|
* ```
|
|
499
522
|
*/
|
|
500
|
-
declare const PdfViewer: React$1.ForwardRefExoticComponent<
|
|
523
|
+
declare const PdfViewer: React$1.ForwardRefExoticComponent<Omit<React$1.HTMLAttributes<HTMLDivElement>, "onError"> & {
|
|
524
|
+
file?: PdfFile;
|
|
525
|
+
title?: string;
|
|
526
|
+
pageWidth?: number;
|
|
527
|
+
onDownload?: () => void;
|
|
528
|
+
onPrint?: () => void;
|
|
529
|
+
onLoadSuccess?: (numPages: number) => void;
|
|
530
|
+
onError?: (error: Error) => void;
|
|
531
|
+
enableTextLayer?: boolean;
|
|
532
|
+
showControls?: boolean;
|
|
533
|
+
viewportBuffer?: number;
|
|
534
|
+
page?: number;
|
|
535
|
+
onPageChange?: (page: number) => void;
|
|
536
|
+
scrollBehavior?: ScrollBehavior;
|
|
537
|
+
viewMode?: PdfViewMode;
|
|
538
|
+
onDimensionsReady?: (dimensions: PdfPageDimensionsMap) => void;
|
|
539
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
501
540
|
|
|
502
541
|
/**
|
|
503
542
|
* Tabs trigger variant styles.
|
|
@@ -578,91 +617,82 @@ interface IconProps extends React$1.SVGProps<SVGSVGElement> {
|
|
|
578
617
|
variant?: IconVariant;
|
|
579
618
|
}
|
|
580
619
|
/**
|
|
581
|
-
*
|
|
582
|
-
*/
|
|
583
|
-
declare const X: React$1.FC<IconProps>;
|
|
584
|
-
/**
|
|
585
|
-
* Lock icon component.
|
|
586
|
-
*/
|
|
587
|
-
declare const Lock: React$1.FC<IconProps>;
|
|
588
|
-
/**
|
|
589
|
-
* Check icon component (circle with checkmark).
|
|
590
|
-
*/
|
|
591
|
-
declare const Check: React$1.FC<IconProps>;
|
|
592
|
-
/**
|
|
593
|
-
* ChevronDown icon component (downward pointing chevron).
|
|
620
|
+
* LockIcon component.
|
|
594
621
|
*/
|
|
595
|
-
declare const
|
|
622
|
+
declare const LockIcon: React$1.FC<IconProps>;
|
|
596
623
|
/**
|
|
597
|
-
*
|
|
624
|
+
* CheckIcon component (circle with checkmark).
|
|
598
625
|
*/
|
|
599
|
-
declare const ChevronUp: React$1.FC<IconProps>;
|
|
600
|
-
declare const Calendar: React$1.FC<IconProps>;
|
|
601
|
-
declare const ChevronLeft: React$1.FC<IconProps>;
|
|
602
|
-
declare const ChevronRight: React$1.FC<IconProps>;
|
|
603
626
|
declare const CheckIcon: React$1.FC<IconProps>;
|
|
604
|
-
declare const
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
declare const
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
declare const
|
|
613
|
-
declare const
|
|
614
|
-
declare const
|
|
615
|
-
declare const
|
|
616
|
-
declare const
|
|
617
|
-
declare const
|
|
618
|
-
declare const
|
|
619
|
-
declare const
|
|
620
|
-
declare const
|
|
621
|
-
declare const
|
|
622
|
-
declare const
|
|
623
|
-
declare const
|
|
624
|
-
declare const
|
|
625
|
-
declare const
|
|
626
|
-
declare const
|
|
627
|
-
declare const
|
|
628
|
-
declare const
|
|
629
|
-
declare const
|
|
630
|
-
declare const
|
|
631
|
-
declare const
|
|
632
|
-
declare const
|
|
633
|
-
declare const
|
|
634
|
-
declare const
|
|
635
|
-
declare const
|
|
636
|
-
declare const
|
|
637
|
-
declare const
|
|
638
|
-
declare const
|
|
639
|
-
declare const
|
|
640
|
-
declare const
|
|
641
|
-
declare const
|
|
642
|
-
declare const
|
|
643
|
-
declare const
|
|
644
|
-
declare const
|
|
645
|
-
declare const
|
|
646
|
-
declare const
|
|
627
|
+
declare const CalendarIcon: React$1.FC<IconProps>;
|
|
628
|
+
/**
|
|
629
|
+
* CheckmarkIcon (just the checkmark) component.
|
|
630
|
+
*/
|
|
631
|
+
declare const CheckmarkIcon: React$1.FC<IconProps>;
|
|
632
|
+
/**
|
|
633
|
+
* ArrowDownIcon component.
|
|
634
|
+
*/
|
|
635
|
+
declare const ArrowDownIcon: React$1.FC<IconProps>;
|
|
636
|
+
declare const ArrowUpIcon: React$1.FC<IconProps>;
|
|
637
|
+
declare const ArrowLeftIcon: React$1.FC<IconProps>;
|
|
638
|
+
declare const ArrowRightIcon: React$1.FC<IconProps>;
|
|
639
|
+
declare const BellIcon: React$1.FC<IconProps>;
|
|
640
|
+
declare const BookmarkIcon: React$1.FC<IconProps>;
|
|
641
|
+
declare const CaretDownIcon: React$1.FC<IconProps>;
|
|
642
|
+
declare const CaretLeftIcon: React$1.FC<IconProps>;
|
|
643
|
+
declare const CaretRightIcon: React$1.FC<IconProps>;
|
|
644
|
+
declare const CaretUpIcon: React$1.FC<IconProps>;
|
|
645
|
+
declare const ChatIcon: React$1.FC<IconProps>;
|
|
646
|
+
declare const CheckmarkSquareIcon: React$1.FC<IconProps>;
|
|
647
|
+
declare const CloseIcon: React$1.FC<IconProps>;
|
|
648
|
+
declare const CloseSmallIcon: React$1.FC<IconProps>;
|
|
649
|
+
declare const CogIcon: React$1.FC<IconProps>;
|
|
650
|
+
declare const CredentialsIcon: React$1.FC<IconProps>;
|
|
651
|
+
declare const DocumentIcon: React$1.FC<IconProps>;
|
|
652
|
+
declare const DollarIcon: React$1.FC<IconProps>;
|
|
653
|
+
declare const EditIcon: React$1.FC<IconProps>;
|
|
654
|
+
declare const EnvelopeIcon: React$1.FC<IconProps>;
|
|
655
|
+
declare const ExclamationIcon: React$1.FC<IconProps>;
|
|
656
|
+
declare const EyeClosedIcon: React$1.FC<IconProps>;
|
|
657
|
+
declare const EyeOpenIcon: React$1.FC<IconProps>;
|
|
658
|
+
declare const FilterIcon: React$1.FC<IconProps>;
|
|
659
|
+
declare const FilterDescendingIcon: React$1.FC<IconProps>;
|
|
660
|
+
declare const GraphBarIcon: React$1.FC<IconProps>;
|
|
661
|
+
declare const GraphDonutIcon: React$1.FC<IconProps>;
|
|
662
|
+
declare const GraphLineIcon: React$1.FC<IconProps>;
|
|
663
|
+
declare const GraphPieIcon: React$1.FC<IconProps>;
|
|
664
|
+
declare const HamburgerMenuIcon: React$1.FC<IconProps>;
|
|
665
|
+
declare const HomeIcon: React$1.FC<IconProps>;
|
|
666
|
+
declare const InformationIcon: React$1.FC<IconProps>;
|
|
667
|
+
declare const LocationIcon: React$1.FC<IconProps>;
|
|
668
|
+
declare const MagnifyingGlassIcon: React$1.FC<IconProps>;
|
|
669
|
+
declare const MinusIcon: React$1.FC<IconProps>;
|
|
670
|
+
declare const PlusIcon: React$1.FC<IconProps>;
|
|
671
|
+
declare const MoreMenuIcon: React$1.FC<IconProps>;
|
|
672
|
+
declare const PhoneIcon: React$1.FC<IconProps>;
|
|
673
|
+
declare const QuestionCircleIcon: React$1.FC<IconProps>;
|
|
674
|
+
declare const ShareIcon: React$1.FC<IconProps>;
|
|
675
|
+
declare const StarIcon: React$1.FC<IconProps>;
|
|
676
|
+
declare const StatementIcon: React$1.FC<IconProps>;
|
|
647
677
|
declare const TableIcon: React$1.FC<IconProps>;
|
|
648
|
-
declare const
|
|
649
|
-
declare const
|
|
650
|
-
declare const
|
|
651
|
-
declare const
|
|
652
|
-
declare const
|
|
653
|
-
declare const
|
|
678
|
+
declare const TrashIcon: React$1.FC<IconProps>;
|
|
679
|
+
declare const UserIcon: React$1.FC<IconProps>;
|
|
680
|
+
declare const UserMultiIcon: React$1.FC<IconProps>;
|
|
681
|
+
declare const WarningIcon: React$1.FC<IconProps>;
|
|
682
|
+
declare const WrenchIcon: React$1.FC<IconProps>;
|
|
683
|
+
declare const LogoutIcon: React$1.FC<IconProps>;
|
|
654
684
|
/**
|
|
655
685
|
* Print icon component.
|
|
656
686
|
*/
|
|
657
|
-
declare const
|
|
687
|
+
declare const PrintIcon: React$1.FC<IconProps>;
|
|
658
688
|
/**
|
|
659
689
|
* Download icon component.
|
|
660
690
|
*/
|
|
661
|
-
declare const
|
|
691
|
+
declare const DownloadIcon: React$1.FC<IconProps>;
|
|
662
692
|
/**
|
|
663
693
|
* Panel icon component.
|
|
664
694
|
*/
|
|
665
|
-
declare const
|
|
695
|
+
declare const PanelIcon: React$1.FC<IconProps>;
|
|
666
696
|
|
|
667
697
|
/**
|
|
668
698
|
* @fileoverview Chart utilities for Altitude UI chart components.
|
|
@@ -1173,4 +1203,4 @@ interface TableProps<T> {
|
|
|
1173
1203
|
*/
|
|
1174
1204
|
declare function Table<T>({ table, className, showPagination, paginationClassName, }: TableProps<T>): react_jsx_runtime.JSX.Element;
|
|
1175
1205
|
|
|
1176
|
-
export {
|
|
1206
|
+
export { ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, Badge, type BadgeProps, BarChart, type BarChartData, type BarChartProps, BellIcon, BookmarkIcon, Button, type ButtonProps, CHART_COLORS, CHART_CONSTANTS, COLOR_SCHEMES, CalendarIcon, CaretDownIcon, CaretLeftIcon, CaretRightIcon, CaretUpIcon, type ChartColorScheme, ChartLegend, type ChartLegendProps, ChatIcon, CheckIcon, Checkbox, type CheckboxProps, CheckmarkIcon, CheckmarkSquareIcon, CloseIcon, CloseSmallIcon, CogIcon, CredentialsIcon, DatePicker, type DatePickerProps, DocumentIcon, DollarIcon, DownloadIcon, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type DropdownMenuTriggerProps, EditIcon, EnvelopeIcon, ExclamationIcon, EyeClosedIcon, EyeOpenIcon, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, FilterDescendingIcon, FilterIcon, GenericTooltip, type GenericTooltipProps, GraphBarIcon, GraphDonutIcon, GraphLineIcon, GraphPieIcon, HamburgerMenuIcon, HomeIcon, type IconProps, type IconVariant, InformationIcon, Input, type InputProps, Label, type LabelProps, type LegendItem, LineChart, type LineChartData, type LineChartProps, type LineSeries, LocationIcon, LockIcon, LogoutIcon, MagnifyingGlassIcon, MinusIcon, MoreMenuIcon, PanelIcon, type PdfFile, PdfViewer, type PdfViewerProps, PhoneIcon, PieChart, type PieChartData, type PieChartProps, type PieLabelProps, PlusIcon, PrintIcon, QuestionCircleIcon, Select, SelectContent, type SelectContentProps, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, type SelectTriggerProps, SelectValue, Separator, ShareIcon, Sidebar, SidebarContent, type SidebarContentProps, SidebarFooter, type SidebarFooterProps, SidebarGroup, SidebarGroupContent, type SidebarGroupContentProps, type SidebarGroupProps, SidebarHeader, type SidebarHeaderProps, SidebarInset, type SidebarInsetProps, SidebarMenu, SidebarMenuButton, type SidebarMenuButtonProps, SidebarMenuItem, type SidebarMenuItemProps, type SidebarMenuProps, type SidebarProps, SidebarProvider, type SidebarProviderProps, StarIcon, StatementIcon, Table, TableIcon, type TableProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, Textarea, type TextareaProps, type TickProps, Tooltip, TooltipContainer, type TooltipContainerProps, TooltipContent, type TooltipContentProps, TooltipItem, type TooltipItemProps, type TooltipProps, TooltipProvider, type TooltipProviderProps, TooltipTrigger, type TooltipTriggerProps, TrashIcon, Typography, type TypographyProps, Upload, type UploadProps, UserIcon, UserMultiIcon, WarningIcon, WrenchIcon, badgeVariants, buttonVariants, calculateYAxisWidth, checkboxVariants, createCustomXAxisLabel, createCustomYAxisLabel, createCustomYAxisRightLabel, createLegendItems, customXAxisTick, customXAxisTickRotated, customYAxisTick, formatLargeNumber, formatPercentage, getHeatmapColor, getPerformanceColor, getSeriesColor, initializePdfWorker, selectTriggerVariants, tabsVariants, typographyVariants, uploadVariants, useSidebar };
|