@starasia/admin 12.32.0 → 12.33.0

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.
@@ -0,0 +1,54 @@
1
+ import { default as React } from 'react';
2
+
3
+ /**
4
+ * Vertical hairline divider for separating groups of actions inside a
5
+ * `SelectionActionBar`. Also available as `SelectionActionBar.Divider`.
6
+ */
7
+ export declare const SelectionActionBarDivider: () => React.JSX.Element;
8
+ export interface SelectionActionBarProps {
9
+ /**
10
+ * Number of selected items. The bar hides itself (renders `null`) when this
11
+ * is `0`, and drives the default `"N selected"` label.
12
+ */
13
+ count: number;
14
+ /**
15
+ * Action controls rendered between the count and the clear button — usually
16
+ * `<Button>`s (compose your own verbs), `<Menu>`s, and
17
+ * `<SelectionActionBar.Divider />` to group them. The bar is only the
18
+ * chrome; what the selection *means* is the consumer's business.
19
+ */
20
+ children: React.ReactNode;
21
+ /**
22
+ * Override the leading label entirely. Default: `"{count} selected"`.
23
+ * Pass a render function to format around the live count.
24
+ */
25
+ label?: React.ReactNode | ((count: number) => React.ReactNode);
26
+ /**
27
+ * Show the trailing `×` clear button (with a divider before it). Omit to
28
+ * render no clear button.
29
+ */
30
+ onClear?: () => void;
31
+ /** aria-label + tooltip for the clear button. @default "Clear selection" */
32
+ clearLabel?: string;
33
+ /** Disable the clear button (e.g. while a batch is in flight). */
34
+ clearDisabled?: boolean;
35
+ /** Distance from the viewport bottom. @default 20 */
36
+ bottom?: number | string;
37
+ /** z-index of the fixed bar. @default 50 */
38
+ zIndex?: number;
39
+ /** Extra style merged onto the pill (the inner floating box). */
40
+ style?: React.CSSProperties;
41
+ className?: string;
42
+ }
43
+ /**
44
+ * Floating, bottom-centered action bar shown while a selection is active —
45
+ * `[ N selected | …actions… | × ]`. Pairs naturally with `TableLayout`'s
46
+ * row selection (which ships no toolbar of its own on purpose). The component
47
+ * is purely the shell: you compose the action buttons as `children`, so the
48
+ * same bar serves "Restore / Delete permanently" for a trash view and
49
+ * "Status / Assign / Move" for a task list.
50
+ */
51
+ export declare function SelectionActionBar({ count, children, label, onClear, clearLabel, clearDisabled, bottom, zIndex, style, className, }: SelectionActionBarProps): React.JSX.Element | null;
52
+ export declare namespace SelectionActionBar {
53
+ var Divider: () => React.JSX.Element;
54
+ }
@@ -31,3 +31,4 @@ export * from './FullSection';
31
31
  export * from './SelectButton';
32
32
  export * from './LayoutDialog';
33
33
  export * from './ImagePreview';
34
+ export * from './SelectionActionBar';