@carto/ps-react-ui 4.3.1 → 4.3.3
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,16 @@ 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
|
|
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 but are included in the preview. This is useful for elements
|
|
11
|
+
* like Dividers that should appear between actions but not count toward the limit.
|
|
12
|
+
*
|
|
13
|
+
* Example: With visibleCount=2 and children [Action1, Divider, Action2, Divider, Action3]:
|
|
14
|
+
* - Preview shows: Action1, Divider, Action2 (2 visible actions + divider)
|
|
15
|
+
* - Hidden: Divider, Action3
|
|
7
16
|
*/
|
|
8
|
-
export declare function ToolbarActions({ children: _children,
|
|
17
|
+
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
|
-
/**
|
|
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
|
-
/**
|
|
36
|
-
|
|
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 */
|