@protonradio/proton-ui 0.6.4 → 0.6.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.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { AriaDialogProps } from 'react-aria';
2
2
  import { AriaPopoverProps } from 'react-aria';
3
+ import { AriaSelectProps } from 'react-aria';
3
4
  import { AriaTableProps } from 'react-aria';
4
- import { CollectionChildren } from '@react-types/shared';
5
5
  import { ColumnProps } from '@react-stately/table';
6
6
  import { default as default_2 } from 'react';
7
7
  import { DOMProps } from '@react-types/shared';
@@ -20,61 +20,6 @@ import { TableStateProps } from 'react-stately';
20
20
  import { TooltipProps as TooltipProps_2 } from 'react-aria-components';
21
21
  import { TooltipTriggerComponentProps } from 'react-aria-components';
22
22
 
23
- export declare function ActionMenu({ children, closeOnNavigation, isDisabled, showCancel, isOpen, close, "data-testId": testId, }: ActionMenuProps): JSX_2.Element;
24
-
25
- export declare namespace ActionMenu {
26
- var Item: ({ name, to }: ActionMenuItemProps) => JSX_2.Element;
27
- }
28
-
29
- declare interface ActionMenuItemProps {
30
- name: string | ReactNode;
31
- to?: string;
32
- }
33
-
34
- /**
35
- * @interface ActionMenuProps
36
- * @description Props interface for the ActionMenu component
37
- */
38
- declare interface ActionMenuProps extends ActionMenuToggleState {
39
- /**
40
- * @param {ReactNode | function} children - Content to be rendered inside the menu, can be components or render function
41
- */
42
- children?: ReactNode | ((props: {
43
- close: () => void;
44
- }) => ReactNode);
45
- /**
46
- * @param {boolean} isDisabled - Prevents the menu from closing
47
- */
48
- isDisabled?: boolean;
49
- /**
50
- * @param {boolean} showCancel - Shows the cancel button
51
- */
52
- showCancel?: boolean;
53
- /**
54
- * @param {string} data-testId - Test ID for the menu container
55
- */
56
- "data-testId"?: string;
57
- }
58
-
59
- /**
60
- * @interface ActionMenuToggleState
61
- * @description State interface for controlling the ActionMenu's open/close behavior
62
- */
63
- declare interface ActionMenuToggleState {
64
- /**
65
- * @param {boolean} isOpen - Controls whether the menu is displayed
66
- */
67
- isOpen: boolean;
68
- /**
69
- * @param {() => void} close - Closes the menu
70
- */
71
- close: () => void;
72
- /**
73
- * @param {boolean} closeOnNavigation - Automatically closes when route changes
74
- */
75
- closeOnNavigation?: boolean;
76
- }
77
-
78
23
  export declare const Badge: ({ variant, children, ...props }: BadgeProps) => JSX_2.Element;
79
24
 
80
25
  export declare interface BadgeProps extends React.HTMLAttributes<HTMLDivElement> {
@@ -351,55 +296,11 @@ export declare const Select: {
351
296
  Option: <T>(props: ItemProps<T>) => JSX_3.Element;
352
297
  };
353
298
 
354
- /**
355
- * A Dropdown select menu that opens a Popover, or an ActionMenu on mobile.
356
- * Supports controlled and uncontrolled modes, and urlSearchParam syncing.
357
- * @interface SelectProps
358
- */
359
- declare function SelectMenu<T extends object>({ label, name, isDisabled, disabledKeys, selectedKey, onSelectionChange, items, "data-testid": testId, children, }: SelectProps<T>): JSX_2.Element;
299
+ declare function SelectMenu<T extends object>({ label, name, isDisabled, ...props }: SelectProps<T>): JSX_2.Element;
360
300
 
361
- declare interface SelectProps<T> {
362
- /** The name of the select field
363
- * @external https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#name
364
- * @prop {string} name
365
- */
366
- name: string;
367
- /** Label to display above the select
368
- * @external https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label#text
369
- * @prop {string} label
370
- */
301
+ declare interface SelectProps<T> extends AriaSelectProps<T> {
371
302
  label?: string;
372
- /** Whether the select is disabled
373
- * @prop {boolean} isDisabled
374
- */
375
- isDisabled?: boolean;
376
- /** Array of keys that should be disabled
377
- * @example ["Thing 1", "Thing 2"]
378
- * @prop {string[] | number[]} disabledKeys
379
- */
380
- disabledKeys?: (string | number)[];
381
- /** Currently selected key
382
- * @prop {string | number} selectedKey
383
- */
384
- selectedKey?: string | number;
385
- /** Callback fired when selection changes
386
- * @prop {(key: string | number) => void} onSelectionChange
387
- */
388
- onSelectionChange?: (key: string | number) => void;
389
- /** Array of items to display
390
- * @example [{ name: "thing 1", label: "Thing 1" }, { name: "thing 2", label: "Thing 2" }]
391
- * @prop {object[]} items
392
- */
393
- items?: T[];
394
- /**
395
- * Test ID for the select
396
- * @prop {string} data-testid
397
- */
398
- "data-testid"?: string;
399
- /** Children elements or render function
400
- * @prop {CollectionChildren<T>} children
401
- */
402
- children: CollectionChildren<T>;
303
+ name: string;
403
304
  }
404
305
 
405
306
  declare const SUCCESS: {
@@ -601,8 +502,3 @@ export { }
601
502
  declare namespace ButtonGroup {
602
503
  var Option: (props: ButtonGroupOptionProps) => import("react/jsx-runtime").JSX.Element;
603
504
  }
604
-
605
-
606
- declare namespace ActionMenu {
607
- var Item: ({ name, to }: ActionMenuItemProps) => import("react/jsx-runtime").JSX.Element;
608
- }