@protonradio/proton-ui 0.11.0-beta.9 → 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 +8 -15
- package/dist/index.es.js +3228 -3263
- 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';
|
|
@@ -51,7 +50,6 @@ declare interface ActionMenuProps {
|
|
|
51
50
|
cancelButtonText?: string;
|
|
52
51
|
title?: string;
|
|
53
52
|
actions?: ActionMenuAction[];
|
|
54
|
-
id?: string;
|
|
55
53
|
onClose?: () => void;
|
|
56
54
|
onSelectionChange?: (keys: Selection_2) => void;
|
|
57
55
|
"data-testid"?: string;
|
|
@@ -294,10 +292,6 @@ declare interface ButtonProps extends AriaButtonProps<"button"> {
|
|
|
294
292
|
* @param {React.ReactNode} children
|
|
295
293
|
*/
|
|
296
294
|
children?: React.ReactNode;
|
|
297
|
-
/** 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.
|
|
298
|
-
* @param {number} __textShift
|
|
299
|
-
*/
|
|
300
|
-
__textShift?: number;
|
|
301
295
|
}
|
|
302
296
|
|
|
303
297
|
declare type ButtonSize = "small" | "medium" | "large" | "xlarge" | "2xlarge";
|
|
@@ -429,11 +423,11 @@ export declare const Input: default_2.ForwardRefExoticComponent<BaseInputProps &
|
|
|
429
423
|
declare type MenuItemType = ActionMenuAction;
|
|
430
424
|
|
|
431
425
|
declare interface MenuProps {
|
|
432
|
-
/** The id of the menu */
|
|
433
|
-
menuId?: string;
|
|
434
426
|
/** Custom trigger component. If not provided, defaults to ellipsis icon */
|
|
435
427
|
renderTrigger?: (triggerProps: TriggerProps) => ReactNode;
|
|
436
|
-
/** Size of the trigger icon
|
|
428
|
+
/** Size of the trigger icon
|
|
429
|
+
* @default 24
|
|
430
|
+
*/
|
|
437
431
|
size?: number;
|
|
438
432
|
/** Title of the parent menu */
|
|
439
433
|
title?: string;
|
|
@@ -444,7 +438,7 @@ declare interface MenuProps {
|
|
|
444
438
|
/** Callback when menu closes */
|
|
445
439
|
onClose?: () => void;
|
|
446
440
|
/** Test ID for the trigger component */
|
|
447
|
-
|
|
441
|
+
triggerTestId?: string;
|
|
448
442
|
/** Test ID for the menu */
|
|
449
443
|
menuTestId?: string;
|
|
450
444
|
/** Callback when a menu item is selected */
|
|
@@ -455,7 +449,7 @@ declare interface MenuProps {
|
|
|
455
449
|
disabledKeys?: string[];
|
|
456
450
|
}
|
|
457
451
|
|
|
458
|
-
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;
|
|
459
453
|
|
|
460
454
|
export declare const Modal: (({ isOpen, onClose, title, subtitle, body, children, isOverlay, "data-testid": dataTestId, }: ModalProps) => JSX_2.Element) & {
|
|
461
455
|
Title: ({ children }: {
|
|
@@ -514,6 +508,7 @@ declare type Palette = {
|
|
|
514
508
|
BRAND: {
|
|
515
509
|
PRIMARY: string;
|
|
516
510
|
PRIMARY_LIGHT: string;
|
|
511
|
+
PRIMARY_SUPER_LIGHT: string;
|
|
517
512
|
SECONDARY: string;
|
|
518
513
|
};
|
|
519
514
|
PRIMARY: {
|
|
@@ -824,6 +819,7 @@ declare interface ThemeVariables {
|
|
|
824
819
|
"--proton-control__shadow-color": string;
|
|
825
820
|
"--proton-color__primary": string;
|
|
826
821
|
"--proton-color__primary-light": string;
|
|
822
|
+
"--proton-color__primary-super-light": string;
|
|
827
823
|
"--proton-color__secondary": string;
|
|
828
824
|
"--proton-control__primary-super-dark": string;
|
|
829
825
|
"--proton-control__primary-dark": string;
|
|
@@ -903,11 +899,8 @@ export declare interface TooltipTriggerProps extends TooltipProps, TooltipTrigge
|
|
|
903
899
|
*/
|
|
904
900
|
declare interface TriggerProps {
|
|
905
901
|
disabled?: boolean;
|
|
906
|
-
/** Props for handling press interactions on the trigger element */
|
|
907
|
-
domTriggerProps: PressProps;
|
|
908
|
-
/** Props for handling menu trigger interactions */
|
|
909
|
-
ariaTriggerProps: AriaButtonProps<"button">;
|
|
910
902
|
isOpen?: boolean;
|
|
903
|
+
setIsOpen?: (isOpen: boolean) => void;
|
|
911
904
|
triggerRef: React.RefObject<HTMLButtonElement>;
|
|
912
905
|
}
|
|
913
906
|
|