@protonradio/proton-ui 0.10.7 → 0.10.8-beta.1
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 +10 -10
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +21 -4
- package/dist/index.es.js +476 -469
- package/dist/index.es.js.map +1 -1
- package/dist/palettes-BDp2VnQU.mjs.map +1 -1
- package/dist/palettes-BZQ9UVED.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -205,7 +205,7 @@ declare interface BaseInputProps {
|
|
|
205
205
|
* A customizable button component that can render as either a button or anchor element
|
|
206
206
|
* @interface ButtonProps
|
|
207
207
|
*/
|
|
208
|
-
export declare function Button({ variant, to, target, onPress, type, isDisabled, "data-testid": testId, children, }: ButtonProps): JSX_2.Element;
|
|
208
|
+
export declare function Button({ variant, size, icon, to, target, onPress, type, isDisabled, "data-testid": testId, children, }: ButtonProps): JSX_2.Element;
|
|
209
209
|
|
|
210
210
|
export declare function ButtonGroup(props: ButtonGroupProps): JSX_2.Element;
|
|
211
211
|
|
|
@@ -250,6 +250,15 @@ declare interface ButtonProps {
|
|
|
250
250
|
* @param {ButtonVariant} variant
|
|
251
251
|
*/
|
|
252
252
|
variant?: ButtonVariant;
|
|
253
|
+
/** The size of the button
|
|
254
|
+
* @param {ButtonSize} size
|
|
255
|
+
* @default "fullWidth"
|
|
256
|
+
*/
|
|
257
|
+
size?: ButtonSize;
|
|
258
|
+
/** The prefix to display within the button
|
|
259
|
+
* @param {React.ReactNode} icon
|
|
260
|
+
*/
|
|
261
|
+
icon?: React.ReactNode;
|
|
253
262
|
/** Should the button be non-interactive?
|
|
254
263
|
* @param {boolean} isDisabled
|
|
255
264
|
*/
|
|
@@ -280,6 +289,8 @@ declare interface ButtonProps {
|
|
|
280
289
|
children?: React.ReactNode;
|
|
281
290
|
}
|
|
282
291
|
|
|
292
|
+
declare type ButtonSize = "fullWidth" | "small" | "medium" | "large" | "xlarge" | "2xlarge";
|
|
293
|
+
|
|
283
294
|
export declare type ButtonVariant = "primary" | "secondary" | "success" | "danger" | "translucent";
|
|
284
295
|
|
|
285
296
|
export declare const Cell: <T>(props: ProtonColumnProps<T>) => JSX.Element;
|
|
@@ -324,7 +335,7 @@ declare interface DialogProps extends AriaDialogProps {
|
|
|
324
335
|
*
|
|
325
336
|
* @interface ElevationProps
|
|
326
337
|
*/
|
|
327
|
-
export declare const Elevation: ({ children,
|
|
338
|
+
export declare const Elevation: ({ children, hasPrimaryGradient, backgroundGradientDirection, "data-testid": dataTestId, }: ElevationProps) => JSX_2.Element;
|
|
328
339
|
|
|
329
340
|
declare interface ElevationProps {
|
|
330
341
|
/**
|
|
@@ -333,8 +344,10 @@ declare interface ElevationProps {
|
|
|
333
344
|
children?: ReactNode;
|
|
334
345
|
/**
|
|
335
346
|
* Whether the elevation should have a background gradient.
|
|
347
|
+
* @important only works in custom dark mode
|
|
348
|
+
* @default false
|
|
336
349
|
*/
|
|
337
|
-
|
|
350
|
+
hasPrimaryGradient?: boolean;
|
|
338
351
|
/**
|
|
339
352
|
* The direction of the background gradient.
|
|
340
353
|
*/
|
|
@@ -395,7 +408,7 @@ declare interface ImageBackgroundProps {
|
|
|
395
408
|
*/
|
|
396
409
|
export declare const Input: default_2.ForwardRefExoticComponent<BaseInputProps & default_2.RefAttributes<HTMLInputElement>>;
|
|
397
410
|
|
|
398
|
-
export declare const Modal: (({ isOpen, onClose, title, subtitle, body, children, isOverlay, }: ModalProps) => JSX_2.Element) & {
|
|
411
|
+
export declare const Modal: (({ isOpen, onClose, title, subtitle, body, children, isOverlay, "data-testid": dataTestId, }: ModalProps) => JSX_2.Element) & {
|
|
399
412
|
Title: ({ children }: {
|
|
400
413
|
children: React.ReactNode;
|
|
401
414
|
}) => JSX_2.Element;
|
|
@@ -441,6 +454,10 @@ declare interface ModalProps {
|
|
|
441
454
|
* Content to render inside the modal
|
|
442
455
|
* */
|
|
443
456
|
children: React.ReactNode;
|
|
457
|
+
/**
|
|
458
|
+
* data-testid for the modal
|
|
459
|
+
* */
|
|
460
|
+
"data-testid"?: string;
|
|
444
461
|
}
|
|
445
462
|
|
|
446
463
|
declare type Palette = {
|