@protonradio/proton-ui 0.7.5 → 0.7.6

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.ts CHANGED
@@ -26,7 +26,7 @@ import { TooltipTriggerComponentProps } from 'react-aria-components';
26
26
  * Renders a list of actions as a focusable menu, or non-focusable children.
27
27
  * @interface ActionMenuProps
28
28
  */
29
- export declare const ActionMenu: ({ id, isOpen, selectionMode, selectedKeys, disabledKeys, children, showCancel, actions, closeOnNavigation, onSelectionChange, onClose, "data-testid": testId, }: ActionMenuProps) => JSX_2.Element;
29
+ export declare const ActionMenu: ({ isOpen, selectionMode, selectedKeys, disabledKeys, children, showCancel, actions, closeOnNavigation, onSelectionChange, onClose, "data-testid": testId, }: ActionMenuProps) => JSX_2.Element;
30
30
 
31
31
  declare interface ActionMenuAction {
32
32
  key: string;
@@ -316,8 +316,6 @@ declare interface DialogProps extends AriaDialogProps {
316
316
  children: React.ReactNode;
317
317
  }
318
318
 
319
- declare function generateThemeCssVariables(palette: Palette): Record<Theme, ThemeVariables>;
320
-
321
319
  declare const GRAYSCALE: {
322
320
  GRAY_SUPER_DARK: string;
323
321
  GRAY_DARK: string;
@@ -349,12 +347,39 @@ declare interface IconProps {
349
347
  color?: string;
350
348
  }
351
349
 
350
+ /**
351
+ * ImageOverlay component for displaying an image with a blur effect.
352
+ * @interface ImageBackgroundProps
353
+ */
354
+ export declare function ImageBackground({ image, imageUrl, onLoad, }: ImageBackgroundProps): JSX_2.Element;
355
+
356
+ declare interface ImageBackgroundProps {
357
+ /**
358
+ * Manually display a background image. Useful for server-side rendering.
359
+ * @important When using this prop, you must style your own image component appropriately.
360
+ * The component will be placed directly in the background without additional styling.
361
+ */
362
+ image?: React.ReactNode;
363
+ /**
364
+ * The URL of the image to display in the background.
365
+ * @important Client-side only. Cannot be used in Server Components.
366
+ * When using this prop, the image will be automatically styled with the background effect.
367
+ */
368
+ imageUrl?: string;
369
+ /**
370
+ * Callback function to handle the image load event.
371
+ * @important Client-side only. Cannot be used in Server Components.
372
+ */
373
+ onLoad?: (image: HTMLImageElement) => void;
374
+ }
375
+
352
376
  /**
353
377
  * A controlled and customizable input component with support for labels, prefixes, suffixes, and error states.
354
378
  */
355
379
  export declare const Input: default_2.ForwardRefExoticComponent<BaseInputProps & default_2.RefAttributes<HTMLInputElement>>;
356
380
 
357
381
  declare type Palette = {
382
+ BASE_COLOR: string;
358
383
  BRAND: {
359
384
  PRIMARY: string;
360
385
  PRIMARY_LIGHT: string;
@@ -389,7 +414,7 @@ declare type Palette = {
389
414
  *
390
415
  * @interface PopoverProps
391
416
  */
392
- export declare function Popover({ children, state, arrow, offset, isEntering, ...props }: PopoverProps): JSX_2.Element;
417
+ export declare function Popover({ children, state, arrow, offset, ...props }: PopoverProps): JSX_2.Element;
393
418
 
394
419
  declare interface PopoverProps extends Omit<AriaPopoverProps, "popoverRef"> {
395
420
  /**
@@ -408,10 +433,6 @@ declare interface PopoverProps extends Omit<AriaPopoverProps, "popoverRef"> {
408
433
  * Whether to show an arrow on the popover.
409
434
  */
410
435
  arrow?: boolean;
411
- /**
412
- * Whether the popover is entering.
413
- */
414
- isEntering?: boolean;
415
436
  }
416
437
 
417
438
  export declare interface ProtonColumnProps<T> extends ColumnProps<T> {
@@ -453,10 +474,31 @@ declare function ResponsiveSelectMenu<T extends object>({ label, name, isDisable
453
474
 
454
475
  export { Row }
455
476
 
477
+ /**
478
+ * Base Overlay component for creating modal-like backgrounds.
479
+ * @interface ScreenOverlayProps
480
+ */
481
+ export declare function ScreenOverlay({ fadeIn, onClose, children, }: ScreenOverlayProps): JSX_2.Element;
482
+
483
+ declare interface ScreenOverlayProps {
484
+ /**
485
+ * Whether to fade in the overlay.
486
+ */
487
+ fadeIn?: boolean;
488
+ /**
489
+ * Callback function to handle events (click or ESC key).
490
+ */
491
+ onClose?: () => void;
492
+ /**
493
+ * Children to render inside the overlay.
494
+ */
495
+ children?: React.ReactNode;
496
+ }
497
+
456
498
  /**
457
499
  * A search input component with optional clear functionality and URL parameter sync.
458
500
  */
459
- export declare const SearchInput: ({ name, placeholder, autoComplete, isClearable, isDisabled, error, defaultValue, value: controlledValue, "data-testid": testId, onChange, onClear, }: SearchInputProps) => JSX_2.Element;
501
+ export declare const SearchInput: ({ name, placeholder, autoComplete, isClearable, error, defaultValue, value: controlledValue, "data-testid": testId, onChange, onClear, }: SearchInputProps) => JSX_2.Element;
460
502
 
461
503
  declare interface SearchInputProps extends Omit<BaseInputProps, "prefix" | "suffix" | "value" | "onChange" | "description" | "descriptionPosition" | "label"> {
462
504
  /** Should the clear button be shown when there is text? */
@@ -592,7 +634,7 @@ declare type Theme = (typeof THEMES)[keyof typeof THEMES];
592
634
  declare interface ThemeContextType {
593
635
  theme: Theme;
594
636
  className: string;
595
- style: ReturnType<typeof generateThemeCssVariables>[Theme];
637
+ style: ThemeVariables;
596
638
  palette: Palette;
597
639
  }
598
640
 
@@ -634,30 +676,6 @@ declare interface ThemeVariables {
634
676
  "--proton-control__secondary-super-light": string;
635
677
  }
636
678
 
637
- /**
638
- * A component that displays a loading tombstone. For use as a placeholder while loading content
639
- * @interface TombstoneProps
640
- */
641
- export declare const Tombstone: ({ width, height, borderRadius, }: TombstoneProps) => JSX_2.Element;
642
-
643
- declare interface TombstoneProps {
644
- /**
645
- * The width of the tombstone.
646
- * @default "100%"
647
- */
648
- width?: string;
649
- /**
650
- * The height of the tombstone.
651
- * @default "1.5rem"
652
- */
653
- height?: string;
654
- /**
655
- * The border radius of the tombstone.
656
- * @default "4px"
657
- */
658
- borderRadius?: string;
659
- }
660
-
661
679
  export declare function Tooltip({ children, arrow, ...props }: TooltipProps): JSX_2.Element;
662
680
 
663
681
  export declare interface TooltipProps extends Omit<TooltipProps_2, "children"> {