@northslopetech/altitude-ui 2.8.2 → 3.0.0-alpha.2
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/README.md +1 -1
- package/dist/index.d.mts +176 -98
- package/dist/index.d.ts +176 -98
- package/dist/index.js +1346 -2047
- package/dist/index.mjs +1320 -2038
- package/dist/styles.css +1 -0
- package/dist/tokens.css +1 -105
- package/package.json +7 -5
- package/dist/acme-tokens.css +0 -90
- package/dist/dnv-tokens.css +0 -103
package/README.md
CHANGED
|
@@ -287,7 +287,7 @@ import { Typography } from "@northslopetech/altitude-ui";
|
|
|
287
287
|
function Example() {
|
|
288
288
|
return (
|
|
289
289
|
<div>
|
|
290
|
-
<Typography variant="display-
|
|
290
|
+
<Typography variant="display-3xl">Large Display Text</Typography>
|
|
291
291
|
<Typography variant="heading-lg">Section Heading</Typography>
|
|
292
292
|
<Typography variant="body-md">Body paragraph text</Typography>
|
|
293
293
|
<Typography variant="label-sm-bold">Form Label</Typography>
|
package/dist/index.d.mts
CHANGED
|
@@ -6,9 +6,12 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
6
6
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
7
7
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
8
8
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
9
|
-
import * as
|
|
9
|
+
import * as _base_ui_react_separator from '@base-ui/react/separator';
|
|
10
|
+
import { Separator as Separator$1 } from '@base-ui/react/separator';
|
|
11
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
10
12
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
11
13
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
14
|
+
import { Switch as Switch$1 } from '@base-ui/react/switch';
|
|
12
15
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
13
16
|
import { Table as Table$1 } from '@tanstack/react-table';
|
|
14
17
|
|
|
@@ -30,10 +33,50 @@ interface ButtonProps extends Button$1.Props, VariantProps<typeof buttonVariants
|
|
|
30
33
|
declare const Button: React$1.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
31
34
|
|
|
32
35
|
/**
|
|
33
|
-
*
|
|
36
|
+
* Current-generation text variant styles using @utility classes from design tokens.
|
|
37
|
+
*/
|
|
38
|
+
declare const textVariants: (props?: ({
|
|
39
|
+
variant?: "h1" | "h2" | "h3" | "h4" | "h5" | "body-xs" | "body-xs-medium" | "body-xs-semibold" | "body-sm" | "body-sm-medium" | "body-sm-semibold" | "body-md" | "body-md-medium" | "body-md-semibold" | "body-lg" | "body-lg-medium" | "body-lg-semibold" | "label-xs" | "label-xs-medium" | "label-xs-semibold" | "label-sm" | "label-sm-medium" | "label-sm-semibold" | "label-md" | "label-md-medium" | "label-md-semibold" | "label-lg" | "label-lg-medium" | "label-lg-semibold" | "eyebrow" | null | undefined;
|
|
40
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
41
|
+
interface TextProps extends React$1.HTMLAttributes<HTMLElement>, VariantProps<typeof textVariants> {
|
|
42
|
+
as?: React$1.ElementType;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Text component for rendering text with design system styles.
|
|
46
|
+
* @param {React.ElementType} [props.as] - Custom HTML element to render
|
|
47
|
+
* @param {string} [props.variant] - Text variant from design tokens
|
|
48
|
+
*/
|
|
49
|
+
declare const Text: React$1.ForwardRefExoticComponent<TextProps & React$1.RefAttributes<HTMLElement>>;
|
|
50
|
+
|
|
51
|
+
type CardProps = React$1.ComponentPropsWithoutRef<"div"> & {
|
|
52
|
+
size?: "default" | "sm";
|
|
53
|
+
};
|
|
54
|
+
declare const Card: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
55
|
+
size?: "default" | "sm";
|
|
56
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
57
|
+
type CardHeaderProps = React$1.ComponentPropsWithoutRef<"div">;
|
|
58
|
+
declare const CardHeader: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
59
|
+
type CardTitleProps = React$1.ComponentPropsWithoutRef<typeof Text>;
|
|
60
|
+
declare const CardTitle: React$1.ForwardRefExoticComponent<Omit<TextProps & React$1.RefAttributes<HTMLElement>, "ref"> & React$1.RefAttributes<HTMLElement>>;
|
|
61
|
+
type CardDescriptionProps = React$1.ComponentPropsWithoutRef<typeof Text>;
|
|
62
|
+
declare const CardDescription: React$1.ForwardRefExoticComponent<Omit<TextProps & React$1.RefAttributes<HTMLElement>, "ref"> & React$1.RefAttributes<HTMLElement>>;
|
|
63
|
+
type CardActionProps = React$1.ComponentPropsWithoutRef<"div">;
|
|
64
|
+
declare const CardAction: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
65
|
+
type CardContentProps = React$1.ComponentPropsWithoutRef<"div"> & {
|
|
66
|
+
bleed?: boolean;
|
|
67
|
+
};
|
|
68
|
+
declare const CardContent: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
69
|
+
bleed?: boolean;
|
|
70
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
71
|
+
type CardFooterProps = React$1.ComponentPropsWithoutRef<"div">;
|
|
72
|
+
declare const CardFooter: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Typography variant styles using @utility classes from design tokens.
|
|
76
|
+
* Original variant names mapped to current-generation type-* utilities.
|
|
34
77
|
*/
|
|
35
78
|
declare const typographyVariants: (props?: ({
|
|
36
|
-
variant?: "
|
|
79
|
+
variant?: "body-xs" | "body-sm" | "body-md" | "label-xs" | "label-sm" | "label-md" | "display-lg" | "display-xl" | "display-2xl" | "display-3xl" | "heading-lg" | "heading-xl" | "heading-2xl" | "heading-3xl" | "body-base" | "label-xs-bold" | "label-sm-bold" | "label-base" | "label-base-bold" | "label-md-bold" | null | undefined;
|
|
37
80
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
38
81
|
interface TypographyProps extends React$1.HTMLAttributes<HTMLElement>, VariantProps<typeof typographyVariants> {
|
|
39
82
|
as?: React$1.ElementType;
|
|
@@ -108,7 +151,17 @@ declare function FieldError({ className, children, errors, ...props }: React.Com
|
|
|
108
151
|
} | undefined>;
|
|
109
152
|
}): react_jsx_runtime.JSX.Element | null;
|
|
110
153
|
|
|
111
|
-
|
|
154
|
+
type SeparatorProps = Separator$1.Props;
|
|
155
|
+
declare const Separator: React$1.ForwardRefExoticComponent<Omit<_base_ui_react_separator.SeparatorProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
156
|
+
|
|
157
|
+
declare const Breadcrumb: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & React$1.RefAttributes<HTMLElement>>;
|
|
158
|
+
declare const BreadcrumbList: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "ref"> & React$1.RefAttributes<HTMLOListElement>>;
|
|
159
|
+
declare const BreadcrumbItem: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React$1.RefAttributes<HTMLLIElement>>;
|
|
160
|
+
type BreadcrumbLinkProps = Omit<useRender.ComponentProps<"a">, "ref">;
|
|
161
|
+
declare const BreadcrumbLink: React$1.ForwardRefExoticComponent<BreadcrumbLinkProps & React$1.RefAttributes<HTMLAnchorElement>>;
|
|
162
|
+
declare const BreadcrumbPage: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
|
|
163
|
+
declare const BreadcrumbSeparator: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React$1.RefAttributes<HTMLLIElement>>;
|
|
164
|
+
declare const BreadcrumbEllipsis: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
|
|
112
165
|
|
|
113
166
|
type TooltipProviderProps = React$1.ComponentProps<typeof TooltipPrimitive.Provider> & {
|
|
114
167
|
delayDuration?: number;
|
|
@@ -295,6 +348,21 @@ interface CheckboxProps extends React$1.ComponentProps<typeof CheckboxPrimitive.
|
|
|
295
348
|
*/
|
|
296
349
|
declare const Checkbox: React$1.ForwardRefExoticComponent<Omit<CheckboxProps, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
297
350
|
|
|
351
|
+
declare const switchVariants: (props?: ({
|
|
352
|
+
size?: "default" | "sm" | null | undefined;
|
|
353
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
354
|
+
interface SwitchProps extends Switch$1.Root.Props, VariantProps<typeof switchVariants> {
|
|
355
|
+
}
|
|
356
|
+
/**
|
|
357
|
+
* Switch (toggle) component with Altitude design system styling.
|
|
358
|
+
* @param {"sm" | "default"} [props.size] - Size variant of the switch
|
|
359
|
+
* @param {boolean} [props.checked] - Controlled checked state
|
|
360
|
+
* @param {function} [props.onCheckedChange] - Callback when checked state changes
|
|
361
|
+
* @param {boolean} [props.disabled] - Whether the switch is disabled
|
|
362
|
+
* @param {string} [props.className] - Additional CSS classes
|
|
363
|
+
*/
|
|
364
|
+
declare const Switch: React$1.ForwardRefExoticComponent<Omit<SwitchProps, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
365
|
+
|
|
298
366
|
/**
|
|
299
367
|
* @fileoverview Input component for Altitude UI.
|
|
300
368
|
*/
|
|
@@ -342,11 +410,43 @@ declare const Badge: React$1.ForwardRefExoticComponent<BadgeProps & React$1.RefA
|
|
|
342
410
|
* PDF file input type - can be a URL string or File object.
|
|
343
411
|
*/
|
|
344
412
|
type PdfFile = string | File;
|
|
413
|
+
type BoundingBoxStyle = {
|
|
414
|
+
/** CSS color string. @default 'rgba(59, 130, 246, 0.2)' */
|
|
415
|
+
fillColor?: string;
|
|
416
|
+
/** CSS color string. @default 'rgba(59, 130, 246, 0.8)' */
|
|
417
|
+
borderColor?: string;
|
|
418
|
+
/** Border width in pixels (non-scaling). @default 2 */
|
|
419
|
+
borderWidth?: number;
|
|
420
|
+
};
|
|
421
|
+
/**
|
|
422
|
+
* A bounding box region on a PDF page.
|
|
423
|
+
* Coordinates are normalized (0-1) relative to page size.
|
|
424
|
+
*
|
|
425
|
+
* Coordinate system origin is at the top-left corner:
|
|
426
|
+
* - x1: left edge
|
|
427
|
+
* - x2: right edge
|
|
428
|
+
* - y1: top edge
|
|
429
|
+
* - y2: bottom edge
|
|
430
|
+
*/
|
|
431
|
+
interface BoundingBox {
|
|
432
|
+
id: string;
|
|
433
|
+
/** 1-indexed */
|
|
434
|
+
page: number;
|
|
435
|
+
x1: number;
|
|
436
|
+
y1: number;
|
|
437
|
+
x2: number;
|
|
438
|
+
y2: number;
|
|
439
|
+
label?: string;
|
|
440
|
+
/** Style overrides merged over defaultBoxStyle */
|
|
441
|
+
style?: BoundingBoxStyle;
|
|
442
|
+
/** Consumer metadata */
|
|
443
|
+
data?: Record<string, unknown>;
|
|
444
|
+
}
|
|
345
445
|
/**
|
|
346
446
|
* Dimensions of a single PDF page at scale 1.0.
|
|
347
447
|
*/
|
|
348
448
|
type PdfPageDimensions = {
|
|
349
|
-
/**
|
|
449
|
+
/** 1-indexed */
|
|
350
450
|
pageNumber: number;
|
|
351
451
|
/** Width in PDF units at scale 1.0 */
|
|
352
452
|
width: number;
|
|
@@ -364,6 +464,20 @@ type PdfPageDimensionsMap = Map<number, PdfPageDimensions>;
|
|
|
364
464
|
* - 'instant': Jump immediately to the target page
|
|
365
465
|
*/
|
|
366
466
|
type ScrollBehavior = "smooth" | "instant";
|
|
467
|
+
/**
|
|
468
|
+
* Target for programmatic scrolling within the PDF viewer.
|
|
469
|
+
* Coordinates are normalized (0-1) matching the bounding box coordinate system.
|
|
470
|
+
*/
|
|
471
|
+
type ScrollTarget = {
|
|
472
|
+
/** 1-indexed */
|
|
473
|
+
page: number;
|
|
474
|
+
/** @default 0 */
|
|
475
|
+
x?: number;
|
|
476
|
+
/** @default 0 */
|
|
477
|
+
y?: number;
|
|
478
|
+
/** Change key — update to re-trigger scroll to the same position */
|
|
479
|
+
key?: string | number;
|
|
480
|
+
};
|
|
367
481
|
/**
|
|
368
482
|
* View mode for PDF display.
|
|
369
483
|
* - 'continuous': All pages rendered in a scrollable container with virtualization
|
|
@@ -374,41 +488,19 @@ type PdfViewMode = "continuous" | "single";
|
|
|
374
488
|
* Props for PDF viewer components.
|
|
375
489
|
*/
|
|
376
490
|
type PdfViewerProps = Omit<React.HTMLAttributes<HTMLDivElement>, "onError"> & {
|
|
377
|
-
/**
|
|
378
|
-
* The PDF file to display. Can be a URL string or a File object.
|
|
379
|
-
*/
|
|
380
491
|
file?: PdfFile;
|
|
381
|
-
/**
|
|
382
|
-
* Document title to display in the header.
|
|
383
|
-
*/
|
|
492
|
+
/** Document title shown in the viewer header */
|
|
384
493
|
title?: string;
|
|
385
|
-
/**
|
|
386
|
-
* Optional custom page width in pixels. If not provided, pages will auto-fit to container width.
|
|
387
|
-
*/
|
|
494
|
+
/** Custom page width in pixels. If not provided, pages auto-fit to container width */
|
|
388
495
|
pageWidth?: number;
|
|
389
|
-
/**
|
|
390
|
-
* Callback when download button is clicked.
|
|
391
|
-
*/
|
|
392
496
|
onDownload?: () => void;
|
|
393
|
-
/**
|
|
394
|
-
* Callback when print button is clicked.
|
|
395
|
-
*/
|
|
396
497
|
onPrint?: () => void;
|
|
397
|
-
/**
|
|
398
|
-
* Callback when the PDF document loads successfully.
|
|
399
|
-
*/
|
|
400
498
|
onLoadSuccess?: (numPages: number) => void;
|
|
401
|
-
/**
|
|
402
|
-
* Callback when there's an error loading or rendering the PDF.
|
|
403
|
-
*/
|
|
499
|
+
/** Called on PDF load or render failure (replaces native onError) */
|
|
404
500
|
onError?: (error: Error) => void;
|
|
405
|
-
/**
|
|
406
|
-
* Enable text layer for text selection. Defaults to false for performance.
|
|
407
|
-
*/
|
|
501
|
+
/** Enable text layer for text selection. Defaults to false for performance */
|
|
408
502
|
enableTextLayer?: boolean;
|
|
409
|
-
/**
|
|
410
|
-
* Whether to show the built-in controls bar (navigation buttons, page indicator).
|
|
411
|
-
*/
|
|
503
|
+
/** Show the built-in controls bar (page navigation, zoom) */
|
|
412
504
|
showControls?: boolean;
|
|
413
505
|
/**
|
|
414
506
|
* Number of pages to render above and below the viewport for virtualization.
|
|
@@ -416,41 +508,44 @@ type PdfViewerProps = Omit<React.HTMLAttributes<HTMLDivElement>, "onError"> & {
|
|
|
416
508
|
*/
|
|
417
509
|
viewportBuffer?: number;
|
|
418
510
|
/**
|
|
419
|
-
*
|
|
420
|
-
*
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
*
|
|
425
|
-
*
|
|
511
|
+
* Scroll target for controlled navigation. When provided, the component operates
|
|
512
|
+
* in controlled mode and expects the parent to manage page state via onPageChange.
|
|
513
|
+
*
|
|
514
|
+
* @example
|
|
515
|
+
* ```tsx
|
|
516
|
+
* // Page-level navigation
|
|
517
|
+
* <PdfViewer file={url} scrollTo={{ page: 5 }} onPageChange={setPage} />
|
|
518
|
+
*
|
|
519
|
+
* // Scroll to bounding box position
|
|
520
|
+
* <PdfViewer
|
|
521
|
+
* file={url}
|
|
522
|
+
* scrollTo={{ page: box.page, x: box.x1, y: box.y1, key: Date.now() }}
|
|
523
|
+
* onPageChange={setPage}
|
|
524
|
+
* />
|
|
525
|
+
* ```
|
|
426
526
|
*/
|
|
527
|
+
scrollTo?: ScrollTarget;
|
|
528
|
+
/** Fires when a different page becomes primary via scrolling or navigation */
|
|
427
529
|
onPageChange?: (page: number) => void;
|
|
428
|
-
/**
|
|
429
|
-
* Scroll behavior when navigating to a page via controls or programmatic navigation.
|
|
430
|
-
*/
|
|
431
530
|
scrollBehavior?: ScrollBehavior;
|
|
432
531
|
/**
|
|
433
|
-
* View mode for displaying the PDF.
|
|
434
532
|
* - 'continuous': Scrollable view with all pages (virtualized)
|
|
435
533
|
* - 'single': One page at a time with navigation
|
|
436
534
|
*/
|
|
437
535
|
viewMode?: PdfViewMode;
|
|
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
|
-
*/
|
|
536
|
+
/** Fires after PDF metadata is parsed. Useful for sizing bounding-box overlays */
|
|
453
537
|
onDimensionsReady?: (dimensions: PdfPageDimensionsMap) => void;
|
|
538
|
+
/** Overlay regions rendered on top of PDF pages */
|
|
539
|
+
boundingBoxes?: BoundingBox[];
|
|
540
|
+
/** Box IDs that receive `highlightStyle` instead of `defaultBoxStyle` */
|
|
541
|
+
highlightedBoxIds?: string[];
|
|
542
|
+
/** Style applied to highlighted boxes, overrides `defaultBoxStyle` */
|
|
543
|
+
highlightStyle?: BoundingBoxStyle;
|
|
544
|
+
/** Base style applied to all bounding boxes unless overridden by `highlightStyle` */
|
|
545
|
+
defaultBoxStyle?: BoundingBoxStyle;
|
|
546
|
+
onBoxClick?: (box: BoundingBox, event: React.MouseEvent) => void;
|
|
547
|
+
onBoxMouseEnter?: (box: BoundingBox, event: React.MouseEvent) => void;
|
|
548
|
+
onBoxMouseLeave?: (box: BoundingBox, event: React.MouseEvent) => void;
|
|
454
549
|
};
|
|
455
550
|
|
|
456
551
|
/**
|
|
@@ -487,36 +582,26 @@ declare function initializePdfWorker(workerUrl: string): void;
|
|
|
487
582
|
*
|
|
488
583
|
* Supports both controlled and uncontrolled modes for page state:
|
|
489
584
|
* - Uncontrolled (default): Component manages page state internally
|
|
490
|
-
* - Controlled: Parent manages page state via `
|
|
585
|
+
* - Controlled: Parent manages page state via `scrollTo` and `onPageChange` props
|
|
491
586
|
*
|
|
492
587
|
* @example
|
|
493
588
|
* ```tsx
|
|
494
589
|
* // Simple usage (uncontrolled)
|
|
495
590
|
* <PdfViewer file="/document.pdf" />
|
|
496
591
|
*
|
|
497
|
-
* // Controlled mode
|
|
592
|
+
* // Controlled mode (page-level navigation)
|
|
498
593
|
* const [page, setPage] = useState(1);
|
|
499
594
|
* <PdfViewer
|
|
500
595
|
* file="/document.pdf"
|
|
501
|
-
*
|
|
596
|
+
* scrollTo={{ page }}
|
|
502
597
|
* onPageChange={setPage}
|
|
503
598
|
* />
|
|
504
599
|
*
|
|
505
|
-
* //
|
|
506
|
-
* <PdfViewer
|
|
507
|
-
* file={pdfFile}
|
|
508
|
-
* title="Invoice_2024.pdf"
|
|
509
|
-
* onDownload={() => console.log('Download clicked')}
|
|
510
|
-
* onPrint={() => console.log('Print clicked')}
|
|
511
|
-
* onLoadSuccess={(pages) => console.log(`Loaded ${pages} pages`)}
|
|
512
|
-
* onError={(error) => console.error(error)}
|
|
513
|
-
* />
|
|
514
|
-
*
|
|
515
|
-
* // With custom width and text layer
|
|
600
|
+
* // Scroll to bounding box position
|
|
516
601
|
* <PdfViewer
|
|
517
602
|
* file="/document.pdf"
|
|
518
|
-
*
|
|
519
|
-
*
|
|
603
|
+
* scrollTo={{ page: box.page, x: box.x1, y: box.y1, key: Date.now() }}
|
|
604
|
+
* onPageChange={setPage}
|
|
520
605
|
* />
|
|
521
606
|
* ```
|
|
522
607
|
*/
|
|
@@ -531,11 +616,18 @@ declare const PdfViewer: React$1.ForwardRefExoticComponent<Omit<React$1.HTMLAttr
|
|
|
531
616
|
enableTextLayer?: boolean;
|
|
532
617
|
showControls?: boolean;
|
|
533
618
|
viewportBuffer?: number;
|
|
534
|
-
|
|
619
|
+
scrollTo?: ScrollTarget;
|
|
535
620
|
onPageChange?: (page: number) => void;
|
|
536
621
|
scrollBehavior?: ScrollBehavior;
|
|
537
622
|
viewMode?: PdfViewMode;
|
|
538
623
|
onDimensionsReady?: (dimensions: PdfPageDimensionsMap) => void;
|
|
624
|
+
boundingBoxes?: BoundingBox[];
|
|
625
|
+
highlightedBoxIds?: string[];
|
|
626
|
+
highlightStyle?: BoundingBoxStyle;
|
|
627
|
+
defaultBoxStyle?: BoundingBoxStyle;
|
|
628
|
+
onBoxClick?: (box: BoundingBox, event: React$1.MouseEvent) => void;
|
|
629
|
+
onBoxMouseEnter?: (box: BoundingBox, event: React$1.MouseEvent) => void;
|
|
630
|
+
onBoxMouseLeave?: (box: BoundingBox, event: React$1.MouseEvent) => void;
|
|
539
631
|
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
540
632
|
|
|
541
633
|
/**
|
|
@@ -606,32 +698,28 @@ declare const DropdownMenuShortcut: {
|
|
|
606
698
|
|
|
607
699
|
/**
|
|
608
700
|
* @fileoverview Icon components for Altitude UI.
|
|
701
|
+
* Icons are sourced from Phosphor Icons (https://phosphoricons.com) and wrapped
|
|
702
|
+
* to support the design system's variant and sizing API.
|
|
609
703
|
*/
|
|
610
704
|
|
|
611
705
|
/**
|
|
612
706
|
* Icon color variant type.
|
|
613
707
|
*/
|
|
614
708
|
type IconVariant = "dark" | "light" | "gray" | "error" | "warning";
|
|
709
|
+
/** Phosphor icon weight (outline, filled, or duotone). */
|
|
710
|
+
type IconWeight = "regular" | "fill" | "duotone";
|
|
615
711
|
interface IconProps extends React$1.SVGProps<SVGSVGElement> {
|
|
616
712
|
className?: string;
|
|
617
713
|
variant?: IconVariant;
|
|
714
|
+
/** Icon size in pixels. Default 16. */
|
|
715
|
+
size?: number;
|
|
716
|
+
/** Phosphor weight: outline (regular), filled, or duotone. */
|
|
717
|
+
weight?: IconWeight;
|
|
618
718
|
}
|
|
619
|
-
/**
|
|
620
|
-
* LockIcon component.
|
|
621
|
-
*/
|
|
622
719
|
declare const LockIcon: React$1.FC<IconProps>;
|
|
623
|
-
/**
|
|
624
|
-
* CheckIcon component (circle with checkmark).
|
|
625
|
-
*/
|
|
626
720
|
declare const CheckIcon: React$1.FC<IconProps>;
|
|
627
721
|
declare const CalendarIcon: React$1.FC<IconProps>;
|
|
628
|
-
/**
|
|
629
|
-
* CheckmarkIcon (just the checkmark) component.
|
|
630
|
-
*/
|
|
631
722
|
declare const CheckmarkIcon: React$1.FC<IconProps>;
|
|
632
|
-
/**
|
|
633
|
-
* ArrowDownIcon component.
|
|
634
|
-
*/
|
|
635
723
|
declare const ArrowDownIcon: React$1.FC<IconProps>;
|
|
636
724
|
declare const ArrowUpIcon: React$1.FC<IconProps>;
|
|
637
725
|
declare const ArrowLeftIcon: React$1.FC<IconProps>;
|
|
@@ -645,7 +733,6 @@ declare const CaretUpIcon: React$1.FC<IconProps>;
|
|
|
645
733
|
declare const ChatIcon: React$1.FC<IconProps>;
|
|
646
734
|
declare const CheckmarkSquareIcon: React$1.FC<IconProps>;
|
|
647
735
|
declare const CloseIcon: React$1.FC<IconProps>;
|
|
648
|
-
declare const CloseSmallIcon: React$1.FC<IconProps>;
|
|
649
736
|
declare const CogIcon: React$1.FC<IconProps>;
|
|
650
737
|
declare const CredentialsIcon: React$1.FC<IconProps>;
|
|
651
738
|
declare const DocumentIcon: React$1.FC<IconProps>;
|
|
@@ -681,17 +768,8 @@ declare const UserMultiIcon: React$1.FC<IconProps>;
|
|
|
681
768
|
declare const WarningIcon: React$1.FC<IconProps>;
|
|
682
769
|
declare const WrenchIcon: React$1.FC<IconProps>;
|
|
683
770
|
declare const LogoutIcon: React$1.FC<IconProps>;
|
|
684
|
-
/**
|
|
685
|
-
* Print icon component.
|
|
686
|
-
*/
|
|
687
771
|
declare const PrintIcon: React$1.FC<IconProps>;
|
|
688
|
-
/**
|
|
689
|
-
* Download icon component.
|
|
690
|
-
*/
|
|
691
772
|
declare const DownloadIcon: React$1.FC<IconProps>;
|
|
692
|
-
/**
|
|
693
|
-
* Panel icon component.
|
|
694
|
-
*/
|
|
695
773
|
declare const PanelIcon: React$1.FC<IconProps>;
|
|
696
774
|
|
|
697
775
|
/**
|
|
@@ -1203,4 +1281,4 @@ interface TableProps<T> {
|
|
|
1203
1281
|
*/
|
|
1204
1282
|
declare function Table<T>({ table, className, showPagination, paginationClassName, }: TableProps<T>): react_jsx_runtime.JSX.Element;
|
|
1205
1283
|
|
|
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,
|
|
1284
|
+
export { ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, Badge, type BadgeProps, BarChart, type BarChartData, type BarChartProps, BellIcon, BookmarkIcon, type BoundingBox, type BoundingBoxStyle, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, CHART_COLORS, CHART_CONSTANTS, COLOR_SCHEMES, CalendarIcon, Card, CardAction, type CardActionProps, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleProps, CaretDownIcon, CaretLeftIcon, CaretRightIcon, CaretUpIcon, type ChartColorScheme, ChartLegend, type ChartLegendProps, ChatIcon, CheckIcon, Checkbox, type CheckboxProps, CheckmarkIcon, CheckmarkSquareIcon, CloseIcon, 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, type IconWeight, 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, type ScrollTarget, Select, SelectContent, type SelectContentProps, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, type SelectTriggerProps, SelectValue, Separator, type SeparatorProps, 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, Switch, type SwitchProps, Table, TableIcon, type TableProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, Text, type TextProps, 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, switchVariants, tabsVariants, textVariants, typographyVariants, uploadVariants, useSidebar };
|