@protonradio/proton-ui 0.10.13-beta.3 → 0.10.13-beta.5
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 +17 -30
- package/dist/index.es.js +2157 -2273
- 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
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { AriaDialogProps } from 'react-aria';
|
|
2
2
|
import { AriaPopoverProps } from 'react-aria';
|
|
3
3
|
import { AriaTableProps } from 'react-aria';
|
|
4
|
-
import { CollectionChildren } from '@react-types/shared';
|
|
5
4
|
import { ColumnProps } from '@react-stately/table';
|
|
6
5
|
import { default as default_2 } from 'react';
|
|
7
6
|
import { DOMProps } from '@react-types/shared';
|
|
8
7
|
import { ForwardRefExoticComponent } from 'react';
|
|
9
|
-
import { ItemProps } from 'react-stately';
|
|
10
8
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
11
|
-
import { JSX as JSX_3 } from 'react';
|
|
12
9
|
import { OverlayTriggerProps } from 'react-stately';
|
|
13
10
|
import { OverlayTriggerState } from 'react-stately';
|
|
14
11
|
import { PressEvent } from 'react-aria';
|
|
@@ -567,18 +564,6 @@ declare interface ResponsiveMenuProps {
|
|
|
567
564
|
|
|
568
565
|
export declare function ResponsiveMenuTrigger({ renderTrigger, menuId, size, actions, disabled, onClose, testId: triggerTestId, menuTestId, }: ResponsiveMenuProps): JSX_2.Element;
|
|
569
566
|
|
|
570
|
-
export declare const ResponsiveSelect: {
|
|
571
|
-
Menu: typeof ResponsiveSelectMenu;
|
|
572
|
-
Option: <T>(props: ItemProps<T>) => JSX_3.Element;
|
|
573
|
-
};
|
|
574
|
-
|
|
575
|
-
/**
|
|
576
|
-
* A dropdown select menu that opens a Popover, or an ActionMenu on mobile.
|
|
577
|
-
* Supports controlled and uncontrolled modes.
|
|
578
|
-
* @interface SelectProps
|
|
579
|
-
*/
|
|
580
|
-
declare function ResponsiveSelectMenu({ label, name, isDisabled, disabledKeys, selectedKey, onSelectionChange, onOpen, onClose, items, "data-testid": testId, children, }: SelectProps<ActionMenuAction>): JSX_2.Element;
|
|
581
|
-
|
|
582
567
|
export declare const Row: <T = object>(props: ProtonRowProps<T>) => JSX.Element;
|
|
583
568
|
|
|
584
569
|
/**
|
|
@@ -628,19 +613,23 @@ export { Section }
|
|
|
628
613
|
|
|
629
614
|
export declare const Select: {
|
|
630
615
|
Menu: typeof SelectMenu;
|
|
631
|
-
Option: <T>(props: ItemProps<T>) => JSX_3.Element;
|
|
632
616
|
};
|
|
633
617
|
|
|
618
|
+
declare interface SelectItem {
|
|
619
|
+
key: string;
|
|
620
|
+
label: string;
|
|
621
|
+
to?: string;
|
|
622
|
+
onAction?: (key: string) => void;
|
|
623
|
+
}
|
|
624
|
+
|
|
634
625
|
/**
|
|
635
|
-
* A dropdown select menu that opens a popover
|
|
636
|
-
*
|
|
626
|
+
* A dropdown select menu that opens a popover on desktop and an action menu on mobile.
|
|
627
|
+
* Supports controlled and uncontrolled modes.
|
|
637
628
|
*/
|
|
638
|
-
declare function SelectMenu
|
|
629
|
+
declare function SelectMenu({ label, name, isDisabled, disabledKeys, selectedKey, onSelectionChange, onOpen, onClose, items, "data-testid": testId, }: SelectProps): JSX_2.Element;
|
|
639
630
|
|
|
640
|
-
declare interface SelectProps
|
|
641
|
-
/** The name of the select field
|
|
642
|
-
* @external https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#name
|
|
643
|
-
*/
|
|
631
|
+
declare interface SelectProps {
|
|
632
|
+
/** The name of the select field */
|
|
644
633
|
name: string;
|
|
645
634
|
/** Label to display above the select
|
|
646
635
|
* @external https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label#text
|
|
@@ -651,23 +640,21 @@ declare interface SelectProps<T> {
|
|
|
651
640
|
/** Array of keys that should be disabled
|
|
652
641
|
* @example ["Thing 1", "Thing 2"]
|
|
653
642
|
*/
|
|
654
|
-
disabledKeys?:
|
|
643
|
+
disabledKeys?: string[];
|
|
655
644
|
/** Currently selected key */
|
|
656
|
-
selectedKey?: string
|
|
645
|
+
selectedKey?: string;
|
|
657
646
|
/** Callback fired when selection changes */
|
|
658
|
-
onSelectionChange?: (key: string
|
|
647
|
+
onSelectionChange?: (key: string) => void;
|
|
659
648
|
/** Callback fired when the menu opens */
|
|
660
649
|
onOpen?: () => void;
|
|
661
650
|
/** Callback fired when the menu closes */
|
|
662
651
|
onClose?: () => void;
|
|
663
652
|
/** Array of items to display
|
|
664
|
-
* @example [{
|
|
653
|
+
* @example [{ key: "thing-1", label: "Thing 1" }, { key: "thing-2", label: "Thing 2" }]
|
|
665
654
|
*/
|
|
666
|
-
items
|
|
655
|
+
items: SelectItem[];
|
|
667
656
|
/** Test ID for the select */
|
|
668
657
|
"data-testid"?: string;
|
|
669
|
-
/** Children elements or render function */
|
|
670
|
-
children: CollectionChildren<T>;
|
|
671
658
|
}
|
|
672
659
|
|
|
673
660
|
export declare function Switch(props: SwitchProps): JSX_2.Element;
|