@protonradio/proton-ui 0.6.18-beta.8 → 0.6.18
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/README.md +73 -73
- package/dist/constants.cjs.js +1 -1
- package/dist/constants.cjs.js.map +1 -1
- package/dist/constants.d.ts +0 -1
- package/dist/constants.es.js +4 -37
- package/dist/constants.es.js.map +1 -1
- package/dist/icons.svg +10 -10
- package/dist/index-BCAZu2vD.mjs +80 -0
- package/dist/index-BCAZu2vD.mjs.map +1 -0
- package/dist/index-Dcfu6hWE.js +2 -0
- package/dist/index-Dcfu6hWE.js.map +1 -0
- package/dist/index.cjs.js +13 -12
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +19 -55
- package/dist/index.es.js +9881 -2211
- package/dist/index.es.js.map +1 -1
- 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 +10 -72
- package/dist/utils.es.js +32 -10
- package/dist/utils.es.js.map +1 -1
- package/package.json +90 -91
- package/dist/colors-BdogYmJi.js +0 -2
- package/dist/colors-BdogYmJi.js.map +0 -1
- package/dist/colors-Dwh4VIMR.mjs +0 -47
- package/dist/colors-Dwh4VIMR.mjs.map +0 -1
- package/dist/utils-61LoaAd7.js +0 -2
- package/dist/utils-61LoaAd7.js.map +0 -1
- package/dist/utils-CF14T2dp.mjs +0 -117
- package/dist/utils-CF14T2dp.mjs.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -316,7 +316,7 @@ declare interface DialogProps extends AriaDialogProps {
|
|
|
316
316
|
children: React.ReactNode;
|
|
317
317
|
}
|
|
318
318
|
|
|
319
|
-
declare function generateThemeCssVariables(
|
|
319
|
+
declare function generateThemeCssVariables(baseColor: RGBArray | null): Record<Theme, ThemeVariables>;
|
|
320
320
|
|
|
321
321
|
declare const GRAYSCALE: {
|
|
322
322
|
GRAY_SUPER_DARK: string;
|
|
@@ -354,32 +354,6 @@ declare interface IconProps {
|
|
|
354
354
|
*/
|
|
355
355
|
export declare const Input: default_2.ForwardRefExoticComponent<BaseInputProps & default_2.RefAttributes<HTMLInputElement>>;
|
|
356
356
|
|
|
357
|
-
declare type Palette = {
|
|
358
|
-
BRAND: {
|
|
359
|
-
PRIMARY: string;
|
|
360
|
-
PRIMARY_LIGHT: string;
|
|
361
|
-
SECONDARY: string;
|
|
362
|
-
};
|
|
363
|
-
PRIMARY: {
|
|
364
|
-
PRIMARY_SUPER_DARK: string;
|
|
365
|
-
PRIMARY_DARK: string;
|
|
366
|
-
PRIMARY_MEDIUM: string;
|
|
367
|
-
PRIMARY_MEDIUM_LIGHT: string;
|
|
368
|
-
PRIMARY_LIGHT: string;
|
|
369
|
-
PRIMARY_LIGHTEST: string;
|
|
370
|
-
PRIMARY_SUPER_LIGHT: string;
|
|
371
|
-
};
|
|
372
|
-
SECONDARY: {
|
|
373
|
-
SECONDARY_SUPER_DARK: string;
|
|
374
|
-
SECONDARY_DARK: string;
|
|
375
|
-
SECONDARY_MEDIUM: string;
|
|
376
|
-
SECONDARY_MEDIUM_LIGHT: string;
|
|
377
|
-
SECONDARY_LIGHT: string;
|
|
378
|
-
SECONDARY_LIGHTEST: string;
|
|
379
|
-
SECONDARY_SUPER_LIGHT: string;
|
|
380
|
-
};
|
|
381
|
-
};
|
|
382
|
-
|
|
383
357
|
/**
|
|
384
358
|
* Popover is an unstyled popover component that handles positioning. It should be used
|
|
385
359
|
* with the Dialog component to provide a styled popover.
|
|
@@ -414,11 +388,20 @@ export declare interface ProtonColumnProps<T> extends ColumnProps<T> {
|
|
|
414
388
|
align?: "left" | "center" | "right";
|
|
415
389
|
}
|
|
416
390
|
|
|
391
|
+
/**
|
|
392
|
+
* A component that displays either a popover menu or an action menu
|
|
393
|
+
* depending on the screen size when the menu trigger is pressed.
|
|
394
|
+
*
|
|
395
|
+
* @param {ResponsiveMenuProps} props - The props for the ResponsiveMenuTrigger component.
|
|
396
|
+
* @returns {JSX.Element} - The ResponsiveMenuTrigger component.
|
|
397
|
+
*/
|
|
417
398
|
declare interface ResponsiveMenuProps {
|
|
418
399
|
/** The id of the menu */
|
|
419
400
|
menuId?: string;
|
|
401
|
+
/** The tab index of the menu trigger */
|
|
402
|
+
tabIndex?: number;
|
|
420
403
|
/** Custom trigger component. If not provided, defaults to ellipsis icon */
|
|
421
|
-
|
|
404
|
+
trigger?: ReactNode;
|
|
422
405
|
/** Size of the trigger icon */
|
|
423
406
|
size?: number;
|
|
424
407
|
/** Array of menu actions/items to display */
|
|
@@ -427,13 +410,11 @@ declare interface ResponsiveMenuProps {
|
|
|
427
410
|
disabled?: boolean;
|
|
428
411
|
/** Callback when menu closes */
|
|
429
412
|
onClose?: () => void;
|
|
430
|
-
/** Test ID for the
|
|
431
|
-
|
|
432
|
-
/** Test ID for the menu */
|
|
433
|
-
menuTestId?: string;
|
|
413
|
+
/** Test ID for the component */
|
|
414
|
+
"data-testid"?: string;
|
|
434
415
|
}
|
|
435
416
|
|
|
436
|
-
export declare function ResponsiveMenuTrigger({
|
|
417
|
+
export declare function ResponsiveMenuTrigger({ trigger, menuId, tabIndex, size, actions, disabled, onClose, "data-testid": testId, }: ResponsiveMenuProps): JSX_2.Element;
|
|
437
418
|
|
|
438
419
|
export declare const ResponsiveSelect: {
|
|
439
420
|
Menu: typeof ResponsiveSelectMenu;
|
|
@@ -447,6 +428,8 @@ export declare const ResponsiveSelect: {
|
|
|
447
428
|
*/
|
|
448
429
|
declare function ResponsiveSelectMenu<T extends object>({ label, name, isDisabled, disabledKeys, selectedKey, onSelectionChange, onOpen, onClose, items, "data-testid": testId, children, }: SelectProps<T>): JSX_2.Element;
|
|
449
430
|
|
|
431
|
+
declare type RGBArray = [number, number, number];
|
|
432
|
+
|
|
450
433
|
export { Row }
|
|
451
434
|
|
|
452
435
|
/**
|
|
@@ -589,7 +572,8 @@ declare interface ThemeContextType {
|
|
|
589
572
|
theme: Theme;
|
|
590
573
|
className: string;
|
|
591
574
|
style: ReturnType<typeof generateThemeCssVariables>[Theme];
|
|
592
|
-
|
|
575
|
+
baseColor: RGBArray;
|
|
576
|
+
themedRGBArray: RGBArray;
|
|
593
577
|
}
|
|
594
578
|
|
|
595
579
|
export declare const ThemeProvider: default_2.FC<ThemeProviderProps>;
|
|
@@ -597,12 +581,11 @@ export declare const ThemeProvider: default_2.FC<ThemeProviderProps>;
|
|
|
597
581
|
declare interface ThemeProviderProps {
|
|
598
582
|
theme: Theme;
|
|
599
583
|
children: ReactNode;
|
|
600
|
-
|
|
584
|
+
baseColor?: RGBArray;
|
|
601
585
|
}
|
|
602
586
|
|
|
603
587
|
export declare const THEMES: {
|
|
604
588
|
readonly DARK: "dark";
|
|
605
|
-
readonly CUSTOM_DARK: "custom-dark";
|
|
606
589
|
readonly LIGHT: "light";
|
|
607
590
|
};
|
|
608
591
|
|
|
@@ -610,10 +593,6 @@ declare interface ThemeVariables {
|
|
|
610
593
|
"--proton-control__background-color": string;
|
|
611
594
|
"--proton-control__text-color": string;
|
|
612
595
|
"--proton-control__border-color": string;
|
|
613
|
-
"--proton-control__shadow-color": string;
|
|
614
|
-
"--proton-color__primary": string;
|
|
615
|
-
"--proton-color__primary-light": string;
|
|
616
|
-
"--proton-color__secondary": string;
|
|
617
596
|
}
|
|
618
597
|
|
|
619
598
|
export declare function Tooltip({ children, arrow, ...props }: TooltipProps): JSX_2.Element;
|
|
@@ -639,21 +618,6 @@ export declare interface TooltipTriggerProps extends TooltipProps, TooltipTrigge
|
|
|
639
618
|
disableTriggerClick?: boolean;
|
|
640
619
|
}
|
|
641
620
|
|
|
642
|
-
/**
|
|
643
|
-
* A component that displays either a popover menu or an action menu
|
|
644
|
-
* depending on the screen size when the menu trigger is pressed.
|
|
645
|
-
*
|
|
646
|
-
* @param {ResponsiveMenuProps} props - The props for the ResponsiveMenuTrigger component.
|
|
647
|
-
* @returns {JSX.Element} - The ResponsiveMenuTrigger component.
|
|
648
|
-
*/
|
|
649
|
-
declare interface TriggerProps {
|
|
650
|
-
"data-testid"?: string;
|
|
651
|
-
disabled?: boolean;
|
|
652
|
-
ref?: React.RefObject<HTMLButtonElement>;
|
|
653
|
-
onClick?: () => void;
|
|
654
|
-
"aria-label": string;
|
|
655
|
-
}
|
|
656
|
-
|
|
657
621
|
/**
|
|
658
622
|
* Hook for creating a popover trigger. This hook manages the state and events for the popover
|
|
659
623
|
* and popover trigger. For examples see Popover.stories.tsx.
|