@carto/ps-react-ui 4.3.1 → 4.3.2

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.
@@ -2,7 +2,13 @@ import { JSX } from 'react';
2
2
  import { ToolbarActionsProps } from './types';
3
3
  /**
4
4
  * A floating toolbar component that displays action buttons.
5
- * Shows a trigger button when there are 3+ actions, which expands
6
- * to reveal all actions with a close button.
5
+ * Shows a trigger button when there are more visible actions than the visibleCount,
6
+ * which expands to reveal all actions with a close button.
7
+ * When visibleCount is undefined, all actions are shown without overflow.
8
+ *
9
+ * Children with the `data-toolbar-hidden` attribute are ignored when counting
10
+ * visible actions and excluded from the collapsed preview, but remain in the
11
+ * expanded view. This is useful for elements like Dividers that should not
12
+ * count as actions.
7
13
  */
8
- export declare function ToolbarActions({ children: _children, full, direction, labels, sx, IconButtonProps, TooltipProps, }: ToolbarActionsProps): JSX.Element | null;
14
+ export declare function ToolbarActions({ children: _children, visibleCount, direction, labels, sx, IconButtonProps, TooltipProps, }: ToolbarActionsProps): JSX.Element | null;
@@ -28,12 +28,19 @@ export interface ToolbarActionsLabels {
28
28
  * Props for the ToolbarActions component
29
29
  */
30
30
  export interface ToolbarActionsProps {
31
- /** Array of React elements (typically IconButtons) to display in the toolbar */
31
+ /**
32
+ * Array of React elements (typically IconButtons) to display in the toolbar.
33
+ * Elements with `data-toolbar-hidden` attribute are ignored when counting visible
34
+ * actions and excluded from the collapsed preview (e.g., Dividers).
35
+ */
32
36
  children: ReactNode[] | ReactNode;
33
37
  /** Direction in which the toolbar expands */
34
38
  direction?: 'left' | 'right';
35
- /** Whether the toolbar is in full mode */
36
- full?: boolean;
39
+ /**
40
+ * Number of visible actions to show in collapsed mode.
41
+ * When undefined, shows all actions without overflow.
42
+ */
43
+ visibleCount?: number;
37
44
  /** Custom labels for UI elements */
38
45
  labels?: ToolbarActionsLabels;
39
46
  /** Custom styles for the root container */