@protonradio/proton-ui 0.11.0-beta.8 → 0.11.0
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 +2 -0
- package/dist/constants.es.js +1 -1
- package/dist/index.cjs.js +12 -12
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +9 -15
- package/dist/index.es.js +3320 -3331
- package/dist/index.es.js.map +1 -1
- package/dist/{palettes-mcF0lNKY.mjs → palettes-D006-kxf.mjs} +65 -62
- package/dist/palettes-D006-kxf.mjs.map +1 -0
- package/dist/palettes-DfloGKJz.js +2 -0
- package/dist/palettes-DfloGKJz.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.cjs.js.map +1 -1
- package/dist/utils.d.ts +7 -0
- package/dist/utils.es.js +111 -105
- package/dist/utils.es.js.map +1 -1
- package/package.json +1 -1
- package/dist/palettes-BX86v-qb.js +0 -2
- package/dist/palettes-BX86v-qb.js.map +0 -1
- package/dist/palettes-mcF0lNKY.mjs.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -10,7 +10,6 @@ import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
|
10
10
|
import { OverlayTriggerProps } from 'react-stately';
|
|
11
11
|
import { OverlayTriggerState } from 'react-stately';
|
|
12
12
|
import { PressEvent } from 'react-aria';
|
|
13
|
-
import { PressProps } from 'react-aria';
|
|
14
13
|
import { ReactNode } from 'react';
|
|
15
14
|
import { RefAttributes } from 'react';
|
|
16
15
|
import { RowProps } from '@react-stately/table';
|
|
@@ -32,6 +31,7 @@ export declare const ActionMenu: ({ isOpen, selectionMode, selectedKeys, default
|
|
|
32
31
|
declare interface ActionMenuAction {
|
|
33
32
|
key: string;
|
|
34
33
|
label?: ReactNode;
|
|
34
|
+
description?: ReactNode;
|
|
35
35
|
to?: string;
|
|
36
36
|
onAction?: (key: string) => void;
|
|
37
37
|
children?: ActionMenuAction[];
|
|
@@ -50,7 +50,6 @@ declare interface ActionMenuProps {
|
|
|
50
50
|
cancelButtonText?: string;
|
|
51
51
|
title?: string;
|
|
52
52
|
actions?: ActionMenuAction[];
|
|
53
|
-
id?: string;
|
|
54
53
|
onClose?: () => void;
|
|
55
54
|
onSelectionChange?: (keys: Selection_2) => void;
|
|
56
55
|
"data-testid"?: string;
|
|
@@ -293,10 +292,6 @@ declare interface ButtonProps extends AriaButtonProps<"button"> {
|
|
|
293
292
|
* @param {React.ReactNode} children
|
|
294
293
|
*/
|
|
295
294
|
children?: React.ReactNode;
|
|
296
|
-
/** DO NOT USE. INTERNAL USE ONLY. Will be used in calculation for the shift of the button text. Represents the # of horizontal pixels to shift.
|
|
297
|
-
* @param {number} __textShift
|
|
298
|
-
*/
|
|
299
|
-
__textShift?: number;
|
|
300
295
|
}
|
|
301
296
|
|
|
302
297
|
declare type ButtonSize = "small" | "medium" | "large" | "xlarge" | "2xlarge";
|
|
@@ -428,11 +423,11 @@ export declare const Input: default_2.ForwardRefExoticComponent<BaseInputProps &
|
|
|
428
423
|
declare type MenuItemType = ActionMenuAction;
|
|
429
424
|
|
|
430
425
|
declare interface MenuProps {
|
|
431
|
-
/** The id of the menu */
|
|
432
|
-
menuId?: string;
|
|
433
426
|
/** Custom trigger component. If not provided, defaults to ellipsis icon */
|
|
434
427
|
renderTrigger?: (triggerProps: TriggerProps) => ReactNode;
|
|
435
|
-
/** Size of the trigger icon
|
|
428
|
+
/** Size of the trigger icon
|
|
429
|
+
* @default 24
|
|
430
|
+
*/
|
|
436
431
|
size?: number;
|
|
437
432
|
/** Title of the parent menu */
|
|
438
433
|
title?: string;
|
|
@@ -443,7 +438,7 @@ declare interface MenuProps {
|
|
|
443
438
|
/** Callback when menu closes */
|
|
444
439
|
onClose?: () => void;
|
|
445
440
|
/** Test ID for the trigger component */
|
|
446
|
-
|
|
441
|
+
triggerTestId?: string;
|
|
447
442
|
/** Test ID for the menu */
|
|
448
443
|
menuTestId?: string;
|
|
449
444
|
/** Callback when a menu item is selected */
|
|
@@ -454,7 +449,7 @@ declare interface MenuProps {
|
|
|
454
449
|
disabledKeys?: string[];
|
|
455
450
|
}
|
|
456
451
|
|
|
457
|
-
export declare function MenuTrigger({ renderTrigger,
|
|
452
|
+
export declare function MenuTrigger({ renderTrigger, size, title, items, disabled, onClose, triggerTestId, menuTestId, onSelectionChange, selectedKey, disabledKeys, }: MenuProps): JSX_2.Element;
|
|
458
453
|
|
|
459
454
|
export declare const Modal: (({ isOpen, onClose, title, subtitle, body, children, isOverlay, "data-testid": dataTestId, }: ModalProps) => JSX_2.Element) & {
|
|
460
455
|
Title: ({ children }: {
|
|
@@ -513,6 +508,7 @@ declare type Palette = {
|
|
|
513
508
|
BRAND: {
|
|
514
509
|
PRIMARY: string;
|
|
515
510
|
PRIMARY_LIGHT: string;
|
|
511
|
+
PRIMARY_SUPER_LIGHT: string;
|
|
516
512
|
SECONDARY: string;
|
|
517
513
|
};
|
|
518
514
|
PRIMARY: {
|
|
@@ -823,6 +819,7 @@ declare interface ThemeVariables {
|
|
|
823
819
|
"--proton-control__shadow-color": string;
|
|
824
820
|
"--proton-color__primary": string;
|
|
825
821
|
"--proton-color__primary-light": string;
|
|
822
|
+
"--proton-color__primary-super-light": string;
|
|
826
823
|
"--proton-color__secondary": string;
|
|
827
824
|
"--proton-control__primary-super-dark": string;
|
|
828
825
|
"--proton-control__primary-dark": string;
|
|
@@ -902,11 +899,8 @@ export declare interface TooltipTriggerProps extends TooltipProps, TooltipTrigge
|
|
|
902
899
|
*/
|
|
903
900
|
declare interface TriggerProps {
|
|
904
901
|
disabled?: boolean;
|
|
905
|
-
/** Props for handling press interactions on the trigger element */
|
|
906
|
-
domTriggerProps: PressProps;
|
|
907
|
-
/** Props for handling menu trigger interactions */
|
|
908
|
-
ariaTriggerProps: AriaButtonProps<"button">;
|
|
909
902
|
isOpen?: boolean;
|
|
903
|
+
setIsOpen?: (isOpen: boolean) => void;
|
|
910
904
|
triggerRef: React.RefObject<HTMLButtonElement>;
|
|
911
905
|
}
|
|
912
906
|
|