@protonradio/proton-ui 0.10.2 → 0.10.3
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/constants.cjs.js +1 -1
- package/dist/constants.d.ts +4 -2
- package/dist/constants.es.js +1 -1
- package/dist/index.cjs.js +13 -13
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +56 -8
- package/dist/index.es.js +2834 -2763
- package/dist/index.es.js.map +1 -1
- package/dist/{palettes-C5f5YDrB.mjs → palettes-BDp2VnQU.mjs} +51 -49
- package/dist/palettes-BDp2VnQU.mjs.map +1 -0
- package/dist/palettes-BZQ9UVED.js +2 -0
- package/dist/palettes-BZQ9UVED.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/utils-DdC7qBKJ.js +2 -0
- package/dist/utils-DdC7qBKJ.js.map +1 -0
- package/dist/{utils-BSRbdZW5.mjs → utils-OggAvvvN.mjs} +110 -106
- package/dist/utils-OggAvvvN.mjs.map +1 -0
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.d.ts +6 -0
- package/dist/utils.es.js +5 -4
- package/package.json +1 -1
- package/dist/palettes-C5f5YDrB.mjs.map +0 -1
- package/dist/palettes-DcfRDQYT.js +0 -2
- package/dist/palettes-DcfRDQYT.js.map +0 -1
- package/dist/utils-BSRbdZW5.mjs.map +0 -1
- package/dist/utils-CfvYSgcC.js +0 -2
- package/dist/utils-CfvYSgcC.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { CollectionChildren } from '@react-types/shared';
|
|
|
5
5
|
import { ColumnProps } from '@react-stately/table';
|
|
6
6
|
import { default as default_2 } from 'react';
|
|
7
7
|
import { DOMProps } from '@react-types/shared';
|
|
8
|
+
import { ForwardRefExoticComponent } from 'react';
|
|
8
9
|
import { ItemProps } from 'react-stately';
|
|
9
10
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
10
11
|
import { JSX as JSX_3 } from 'react';
|
|
@@ -12,6 +13,7 @@ import { OverlayTriggerProps } from 'react-stately';
|
|
|
12
13
|
import { OverlayTriggerState } from 'react-stately';
|
|
13
14
|
import { PressEvent } from 'react-aria';
|
|
14
15
|
import { ReactNode } from 'react';
|
|
16
|
+
import { RefAttributes } from 'react';
|
|
15
17
|
import { RowProps } from '@react-stately/table';
|
|
16
18
|
import { Section } from '@react-stately/table';
|
|
17
19
|
import { Selection as Selection_2 } from 'react-stately';
|
|
@@ -26,7 +28,7 @@ import { TooltipTriggerComponentProps } from 'react-aria-components';
|
|
|
26
28
|
* Renders a list of actions as a focusable menu, or non-focusable children.
|
|
27
29
|
* @interface ActionMenuProps
|
|
28
30
|
*/
|
|
29
|
-
export declare const ActionMenu: ({ isOpen, selectionMode, selectedKeys, disabledKeys, children, showCancel, actions, closeOnNavigation, onSelectionChange, onClose, "data-testid": testId, }: ActionMenuProps) => JSX_2.Element;
|
|
31
|
+
export declare const ActionMenu: ({ isOpen, selectionMode, selectedKeys, disabledKeys, children, beforeActions, afterActions, showCancel, cancelButtonText, actions, closeOnNavigation, onSelectionChange, onClose, "data-testid": testId, }: ActionMenuProps) => JSX_2.Element;
|
|
30
32
|
|
|
31
33
|
declare interface ActionMenuAction {
|
|
32
34
|
key: string;
|
|
@@ -43,7 +45,14 @@ declare interface ActionMenuProps {
|
|
|
43
45
|
children?: ReactNode | ((props: {
|
|
44
46
|
close: () => void;
|
|
45
47
|
}) => ReactNode);
|
|
48
|
+
beforeActions?: ReactNode | ((props: {
|
|
49
|
+
close: () => void;
|
|
50
|
+
}) => ReactNode);
|
|
51
|
+
afterActions?: ReactNode | ((props: {
|
|
52
|
+
close: () => void;
|
|
53
|
+
}) => ReactNode);
|
|
46
54
|
showCancel?: boolean;
|
|
55
|
+
cancelButtonText?: string;
|
|
47
56
|
closeOnNavigation?: boolean;
|
|
48
57
|
actions?: ActionMenuAction[];
|
|
49
58
|
id?: string;
|
|
@@ -344,12 +353,51 @@ declare interface ImageBackgroundProps {
|
|
|
344
353
|
*/
|
|
345
354
|
export declare const Input: default_2.ForwardRefExoticComponent<BaseInputProps & default_2.RefAttributes<HTMLInputElement>>;
|
|
346
355
|
|
|
347
|
-
export declare const Modal: ({ isOpen, onClose, title, children }: ModalProps) => JSX_2.Element
|
|
356
|
+
export declare const Modal: (({ isOpen, onClose, title, subtitle, body, children, isOverlay, }: ModalProps) => JSX_2.Element) & {
|
|
357
|
+
Title: ({ children }: {
|
|
358
|
+
children: React.ReactNode;
|
|
359
|
+
}) => JSX_2.Element;
|
|
360
|
+
Subtitle: ({ children }: {
|
|
361
|
+
children: React.ReactNode;
|
|
362
|
+
}) => JSX_2.Element;
|
|
363
|
+
Body: ({ children }: {
|
|
364
|
+
children: React.ReactNode;
|
|
365
|
+
}) => JSX_2.Element;
|
|
366
|
+
Action: (props: ButtonProps) => JSX_2.Element;
|
|
367
|
+
Actions: ({ children }: {
|
|
368
|
+
children: React.ReactNode;
|
|
369
|
+
}) => JSX_2.Element;
|
|
370
|
+
};
|
|
348
371
|
|
|
349
372
|
declare interface ModalProps {
|
|
373
|
+
/**
|
|
374
|
+
* Controls the visibility of the modal
|
|
375
|
+
* */
|
|
350
376
|
isOpen: boolean;
|
|
377
|
+
/**
|
|
378
|
+
* Callback function when modal is closed
|
|
379
|
+
* */
|
|
351
380
|
onClose: () => void;
|
|
381
|
+
/**
|
|
382
|
+
* Whether to show the modal with an overlay background.
|
|
383
|
+
* @default true
|
|
384
|
+
* */
|
|
385
|
+
isOverlay?: boolean;
|
|
386
|
+
/**
|
|
387
|
+
* Optional title text for the modal header
|
|
388
|
+
* */
|
|
352
389
|
title?: string;
|
|
390
|
+
/**
|
|
391
|
+
* Optional subtitle text below the modal title
|
|
392
|
+
* */
|
|
393
|
+
subtitle?: string;
|
|
394
|
+
/**
|
|
395
|
+
* Optional body text content for the modal
|
|
396
|
+
* */
|
|
397
|
+
body?: string;
|
|
398
|
+
/**
|
|
399
|
+
* Content to render inside the modal
|
|
400
|
+
* */
|
|
353
401
|
children: React.ReactNode;
|
|
354
402
|
}
|
|
355
403
|
|
|
@@ -482,22 +530,21 @@ export declare const Row: <T = object>(props: ProtonRowProps<T>) => JSX.Element;
|
|
|
482
530
|
* Base Overlay component for creating modal-like backgrounds.
|
|
483
531
|
* @interface ScreenOverlayProps
|
|
484
532
|
*/
|
|
485
|
-
export declare
|
|
533
|
+
export declare const ScreenOverlay: ForwardRefExoticComponent<Omit<ScreenOverlayProps, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
486
534
|
|
|
487
535
|
declare interface ScreenOverlayProps {
|
|
488
536
|
/**
|
|
489
537
|
* Whether to fade in the overlay.
|
|
490
538
|
*/
|
|
491
539
|
fadeIn?: boolean;
|
|
492
|
-
/**
|
|
493
|
-
* Whether to fade out the overlay.
|
|
494
|
-
* @important Fade out triggers on click, you must provide an onClose prop to use this.
|
|
495
|
-
*/
|
|
496
|
-
fadeOut?: boolean;
|
|
497
540
|
/**
|
|
498
541
|
* Callback function to handle events (click or ESC key).
|
|
499
542
|
*/
|
|
500
543
|
onClose?: () => void;
|
|
544
|
+
/**
|
|
545
|
+
* Ref to the overlay element.
|
|
546
|
+
*/
|
|
547
|
+
ref?: React.RefObject<HTMLDivElement>;
|
|
501
548
|
/**
|
|
502
549
|
* Children to render inside the overlay.
|
|
503
550
|
*/
|
|
@@ -697,6 +744,7 @@ declare const THEMES: {
|
|
|
697
744
|
|
|
698
745
|
declare interface ThemeVariables {
|
|
699
746
|
"--proton-control__background-color": string;
|
|
747
|
+
"--proton-control__background-color-light": string;
|
|
700
748
|
"--proton-control__text-color": string;
|
|
701
749
|
"--proton-control__border-color": string;
|
|
702
750
|
"--proton-control__shadow-color": string;
|