@protonradio/proton-ui 0.10.3 → 0.10.4
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 +48 -1
- package/dist/index.es.js +1731 -1611
- 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
|
@@ -293,6 +293,23 @@ export declare const Cell: <T>(props: ProtonColumnProps<T>) => JSX.Element;
|
|
|
293
293
|
|
|
294
294
|
export declare const Column: <T>(props: ProtonColumnProps<T>) => JSX.Element;
|
|
295
295
|
|
|
296
|
+
/**
|
|
297
|
+
* Input with a button to copy value to the clipboard.
|
|
298
|
+
* @interface CopyInputProps
|
|
299
|
+
*/
|
|
300
|
+
export declare function CopyInput({ name, value, onError, onSuccess }: CopyInputProps): JSX_2.Element;
|
|
301
|
+
|
|
302
|
+
declare interface CopyInputProps {
|
|
303
|
+
/** The name of the input field */
|
|
304
|
+
name: string;
|
|
305
|
+
/** The value to display in the input and copy to clipboard */
|
|
306
|
+
value: string;
|
|
307
|
+
/** Optional callback when copy fails, receives the error object */
|
|
308
|
+
onError?: (error: Error) => void;
|
|
309
|
+
/** Optional callback when copy succeeds */
|
|
310
|
+
onSuccess?: () => void;
|
|
311
|
+
}
|
|
312
|
+
|
|
296
313
|
/**
|
|
297
314
|
* Intended use in overlay containers such as modals or popovers.
|
|
298
315
|
*/
|
|
@@ -303,6 +320,36 @@ declare interface DialogProps extends AriaDialogProps {
|
|
|
303
320
|
children: React.ReactNode;
|
|
304
321
|
}
|
|
305
322
|
|
|
323
|
+
/**
|
|
324
|
+
* Elevation component creates a visual elevation effect using the theme-aware background color.
|
|
325
|
+
*
|
|
326
|
+
* This component is designed to be used as a visual layer that sits on top of other content
|
|
327
|
+
* to create a sense of depth or hierarchy in the UI. It uses the `--proton-control__background-color-light`
|
|
328
|
+
* CSS variable which is theme-aware and will adapt to light, dark, and custom-dark themes.
|
|
329
|
+
*
|
|
330
|
+
* @interface ElevationProps
|
|
331
|
+
*/
|
|
332
|
+
export declare const Elevation: ({ children, backgroundGradient, backgroundGradientDirection, "data-testid": dataTestId, }: ElevationProps) => JSX_2.Element;
|
|
333
|
+
|
|
334
|
+
declare interface ElevationProps {
|
|
335
|
+
/**
|
|
336
|
+
* The content to be displayed within the elevation.
|
|
337
|
+
*/
|
|
338
|
+
children?: ReactNode;
|
|
339
|
+
/**
|
|
340
|
+
* Whether the elevation should have a background gradient.
|
|
341
|
+
*/
|
|
342
|
+
backgroundGradient?: boolean;
|
|
343
|
+
/**
|
|
344
|
+
* The direction of the background gradient.
|
|
345
|
+
*/
|
|
346
|
+
backgroundGradientDirection?: "left" | "right";
|
|
347
|
+
/**
|
|
348
|
+
* The data-testid attribute for testing purposes.
|
|
349
|
+
*/
|
|
350
|
+
"data-testid"?: string;
|
|
351
|
+
}
|
|
352
|
+
|
|
306
353
|
export declare function Icon(props: Omit<IconProps, "svgContent">): JSX_2.Element;
|
|
307
354
|
|
|
308
355
|
declare type IconID = "external-link" | "caret-down";
|
|
@@ -377,7 +424,7 @@ declare interface ModalProps {
|
|
|
377
424
|
/**
|
|
378
425
|
* Callback function when modal is closed
|
|
379
426
|
* */
|
|
380
|
-
onClose
|
|
427
|
+
onClose?: () => void;
|
|
381
428
|
/**
|
|
382
429
|
* Whether to show the modal with an overlay background.
|
|
383
430
|
* @default true
|