@up42/up-components 8.0.0 → 8.2.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,49 @@
1
+ import { SxProps, Theme } from '@mui/material';
2
+ import React, { ReactNode } from 'react';
3
+ export type ActionToolbarProps = {
4
+ count: number;
5
+ singleLabel?: string;
6
+ multipleLabel?: string;
7
+ clearLabel?: string;
8
+ onClearSelection: () => void;
9
+ centerSlot?: ReactNode;
10
+ actionsSlot?: ReactNode;
11
+ color?: Color;
12
+ sx?: SxProps<Theme>;
13
+ /**
14
+ * This property defines the position where the component will be displayed.
15
+ * It is not part of the styling properties since this is taken as a configuration property.
16
+ */
17
+ position: 'bottom' | 'top';
18
+ /**
19
+ * This property defines the padding applied to the component in relation to the "position" property.
20
+ * It is not part of the styling properties since this is taken as a configuration property.
21
+ */
22
+ padding: string;
23
+ };
24
+ declare const COLORS: {
25
+ readonly primary: {
26
+ readonly bgColor: string;
27
+ readonly borderColor: string;
28
+ readonly textColor: string;
29
+ readonly badgeColor: string;
30
+ readonly badgeText: string;
31
+ };
32
+ readonly info: {
33
+ readonly bgColor: string;
34
+ readonly borderColor: string;
35
+ readonly textColor: string;
36
+ readonly badgeColor: string;
37
+ readonly badgeText: string;
38
+ };
39
+ readonly warning: {
40
+ readonly bgColor: string;
41
+ readonly borderColor: string;
42
+ readonly textColor: string;
43
+ readonly badgeColor: string;
44
+ readonly badgeText: string;
45
+ };
46
+ };
47
+ type Color = keyof typeof COLORS;
48
+ export declare const ActionToolbar: ({ count, singleLabel, multipleLabel, clearLabel, onClearSelection, centerSlot, actionsSlot, color, sx, position, padding, }: ActionToolbarProps) => React.JSX.Element;
49
+ export {};
@@ -0,0 +1,43 @@
1
+ import React from 'react';
2
+ import { type PopoverProps } from '../Popover/Popover';
3
+ export type FilterPopoverProps = Pick<PopoverProps, 'anchorEl' | 'onClose' | 'header' | 'sx' | 'size'> & {
4
+ /**
5
+ * Filter area content (placeholder node for now).
6
+ */
7
+ content?: React.ReactNode;
8
+ /**
9
+ * Apply button text.
10
+ * @default 'Apply filters'
11
+ */
12
+ applyButtonLabel?: string;
13
+ /**
14
+ * Loading state for the count of results.
15
+ * @default false
16
+ */
17
+ isLoadingCount?: boolean;
18
+ /**
19
+ * Clear button text.
20
+ * @default 'Reset to defaults'
21
+ */
22
+ clearButtonLabel?: string;
23
+ /**
24
+ * When true, Apply is enabled; when false, disabled.
25
+ * @default false
26
+ */
27
+ disableApplyButton?: boolean;
28
+ /**
29
+ * Called when Apply is clicked; popover closes after.
30
+ */
31
+ onApply?: () => void | Promise<void>;
32
+ /**
33
+ * Called when Clear is clicked; no other behaviour (no close).
34
+ */
35
+ onClear?: () => void | Promise<void>;
36
+ };
37
+ /**
38
+ * Main container for filter inputs. Composes Popover with Apply/Clear footer.
39
+ * Opens when the user clicks the anchor; closes on Apply or Escape.
40
+ *
41
+ * Documentation: https://up-components.up42.com/?path=/docs-patterns-popovers-filterpopover--docs
42
+ */
43
+ export declare const FilterPopover: ({ anchorEl, onClose, header, content, applyButtonLabel, clearButtonLabel, disableApplyButton, isLoadingCount, onApply, onClear, ...popoverProps }: FilterPopoverProps) => React.JSX.Element;
@@ -36,6 +36,7 @@ export { ControlButton, type ControlButtonProps } from './components/ControlButt
36
36
  export { CopyButton, type CopyButtonProps } from './components/CopyButton/CopyButton';
37
37
  export { InfoPopover, type InfoPopoverProps } from './components/InfoPopover/InfoPopover';
38
38
  export { Popover, type PopoverProps } from './components/Popover/Popover';
39
+ export { FilterPopover, type FilterPopoverProps } from './components/FilterPopover/FilterPopover';
39
40
  export { PageHeader, type PageHeaderProps } from './components/PageHeader/PageHeader';
40
41
  export { PageHeaderV2, type PageHeaderV2Props } from './components/PageHeaderV2/PageHeaderV2';
41
42
  export { NotFound, type NotFoundProps } from './components/NotFound/NotFound';
@@ -62,6 +63,7 @@ export { DataGrid, GridRow, GridCell, GridEditInputCell, GridCellModes, GridFoot
62
63
  export type { GridColDef, GridRenderEditCellParams, GridCellModesModel, GridCellParams, GridRenderCellParams, GridRowId, GridRowParams, GridRowSelectionModel, GridRowsProp, GridSortModel, GridTreeNodeWithRender, GridColumnHeaderParams, GridEditCellProps, GridInitialState, GridPreProcessEditCellProps, } from './components/DataGrid/DataGrid';
63
64
  export { ToggleButton, type ToggleButtonProps } from './components/ToggleButton/ToggleButton';
64
65
  export { FindUsersButton, LearnMoreButton, RoleBanner, type FindUsersButtonProps, type LearnMoreButtonProps, type RoleBannerProps, } from './components/RoleBanner/RoleBanner';
66
+ export { ActionToolbar, type ActionToolbarProps } from './components/ActionToolbar/ActionToolbar';
65
67
  export { capitalize } from './utils/helpers/capitalize';
66
68
  export { copyToClipboard } from './utils/helpers/copyToClipboard';
67
69
  export { formatNumber } from './utils/helpers/formatNumber';