@up42/up-components 7.5.0-react-18.0 → 8.1.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.
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/types/components/FilterPopover/FilterPopover.d.ts +43 -0
- package/dist/cjs/types/index.d.ts +1 -0
- package/dist/esm/index.js +2 -2
- package/dist/esm/types/components/FilterPopover/FilterPopover.d.ts +43 -0
- package/dist/esm/types/index.d.ts +1 -0
- package/dist/index.d.ts +45 -3
- package/package.json +13 -11
|
@@ -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';
|