@protonradio/proton-ui 0.10.3 → 0.10.5
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.cjs.js +13 -13
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +51 -9
- package/dist/index.es.js +2170 -2053
- package/dist/index.es.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ import { TooltipTriggerComponentProps } from 'react-aria-components';
|
|
|
28
28
|
* Renders a list of actions as a focusable menu, or non-focusable children.
|
|
29
29
|
* @interface ActionMenuProps
|
|
30
30
|
*/
|
|
31
|
-
export declare const ActionMenu: ({ isOpen, selectionMode, selectedKeys, disabledKeys, children,
|
|
31
|
+
export declare const ActionMenu: ({ isOpen, selectionMode, selectedKeys, disabledKeys, children, showCancel, cancelButtonText, actions, onSelectionChange, onClose, "data-testid": testId, }: ActionMenuProps) => JSX_2.Element;
|
|
32
32
|
|
|
33
33
|
declare interface ActionMenuAction {
|
|
34
34
|
key: string;
|
|
@@ -45,15 +45,8 @@ declare interface ActionMenuProps {
|
|
|
45
45
|
children?: ReactNode | ((props: {
|
|
46
46
|
close: () => void;
|
|
47
47
|
}) => ReactNode);
|
|
48
|
-
beforeActions?: ReactNode | ((props: {
|
|
49
|
-
close: () => void;
|
|
50
|
-
}) => ReactNode);
|
|
51
|
-
afterActions?: ReactNode | ((props: {
|
|
52
|
-
close: () => void;
|
|
53
|
-
}) => ReactNode);
|
|
54
48
|
showCancel?: boolean;
|
|
55
49
|
cancelButtonText?: string;
|
|
56
|
-
closeOnNavigation?: boolean;
|
|
57
50
|
actions?: ActionMenuAction[];
|
|
58
51
|
id?: string;
|
|
59
52
|
onClose?: () => void;
|
|
@@ -293,6 +286,25 @@ export declare const Cell: <T>(props: ProtonColumnProps<T>) => JSX.Element;
|
|
|
293
286
|
|
|
294
287
|
export declare const Column: <T>(props: ProtonColumnProps<T>) => JSX.Element;
|
|
295
288
|
|
|
289
|
+
/**
|
|
290
|
+
* Input with a button to copy value to the clipboard.
|
|
291
|
+
* @interface CopyInputProps
|
|
292
|
+
*/
|
|
293
|
+
export declare function CopyInput({ name, value, isDisabled, onError, onSuccess, }: CopyInputProps): JSX_2.Element;
|
|
294
|
+
|
|
295
|
+
declare interface CopyInputProps {
|
|
296
|
+
/** The name of the input field */
|
|
297
|
+
name: string;
|
|
298
|
+
/** The value to display in the input and copy to clipboard */
|
|
299
|
+
value: string;
|
|
300
|
+
/** Whether the input is disabled */
|
|
301
|
+
isDisabled?: boolean;
|
|
302
|
+
/** Optional callback when copy fails, receives the error object */
|
|
303
|
+
onError?: (error: Error) => void;
|
|
304
|
+
/** Optional callback when copy succeeds */
|
|
305
|
+
onSuccess?: () => void;
|
|
306
|
+
}
|
|
307
|
+
|
|
296
308
|
/**
|
|
297
309
|
* Intended use in overlay containers such as modals or popovers.
|
|
298
310
|
*/
|
|
@@ -303,6 +315,36 @@ declare interface DialogProps extends AriaDialogProps {
|
|
|
303
315
|
children: React.ReactNode;
|
|
304
316
|
}
|
|
305
317
|
|
|
318
|
+
/**
|
|
319
|
+
* Elevation component creates a visual elevation effect using the theme-aware background color.
|
|
320
|
+
*
|
|
321
|
+
* This component is designed to be used as a visual layer that sits on top of other content
|
|
322
|
+
* to create a sense of depth or hierarchy in the UI. It uses the `--proton-control__background-color-light`
|
|
323
|
+
* CSS variable which is theme-aware and will adapt to light, dark, and custom-dark themes.
|
|
324
|
+
*
|
|
325
|
+
* @interface ElevationProps
|
|
326
|
+
*/
|
|
327
|
+
export declare const Elevation: ({ children, backgroundGradient, backgroundGradientDirection, "data-testid": dataTestId, }: ElevationProps) => JSX_2.Element;
|
|
328
|
+
|
|
329
|
+
declare interface ElevationProps {
|
|
330
|
+
/**
|
|
331
|
+
* The content to be displayed within the elevation.
|
|
332
|
+
*/
|
|
333
|
+
children?: ReactNode;
|
|
334
|
+
/**
|
|
335
|
+
* Whether the elevation should have a background gradient.
|
|
336
|
+
*/
|
|
337
|
+
backgroundGradient?: boolean;
|
|
338
|
+
/**
|
|
339
|
+
* The direction of the background gradient.
|
|
340
|
+
*/
|
|
341
|
+
backgroundGradientDirection?: "left" | "right";
|
|
342
|
+
/**
|
|
343
|
+
* The data-testid attribute for testing purposes.
|
|
344
|
+
*/
|
|
345
|
+
"data-testid"?: string;
|
|
346
|
+
}
|
|
347
|
+
|
|
306
348
|
export declare function Icon(props: Omit<IconProps, "svgContent">): JSX_2.Element;
|
|
307
349
|
|
|
308
350
|
declare type IconID = "external-link" | "caret-down";
|
|
@@ -377,7 +419,7 @@ declare interface ModalProps {
|
|
|
377
419
|
/**
|
|
378
420
|
* Callback function when modal is closed
|
|
379
421
|
* */
|
|
380
|
-
onClose
|
|
422
|
+
onClose?: () => void;
|
|
381
423
|
/**
|
|
382
424
|
* Whether to show the modal with an overlay background.
|
|
383
425
|
* @default true
|