opus-toolkit-components 1.8.8 → 1.8.9

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,38 @@
1
+ export interface FilterPopoverOption {
2
+ label: string;
3
+ value: string;
4
+ }
5
+
6
+ export interface FilterPopoverRenderContext {
7
+ isOpen: boolean;
8
+ selectedValues: string[];
9
+ setSelectedValues: React.Dispatch<React.SetStateAction<string[]>>;
10
+ toggleValue: (value: string) => void;
11
+ searchTerm: string;
12
+ setSearchTerm: (value: string) => void;
13
+ filteredOptions: FilterPopoverOption[];
14
+ closePopover: () => void;
15
+ }
16
+
17
+ export interface FilterPopoverProps
18
+ extends React.HTMLAttributes<HTMLDivElement> {
19
+ options?: FilterPopoverOption[];
20
+ selectedValues?: string[];
21
+ onApply?: (values: string[]) => void;
22
+ placeholder?: string;
23
+ buttonLabel?: React.ReactNode;
24
+ icon?: React.ReactNode;
25
+ children?:
26
+ | React.ReactNode
27
+ | ((context: FilterPopoverRenderContext) => React.ReactNode);
28
+ footer?:
29
+ | React.ReactNode
30
+ | ((context: FilterPopoverRenderContext) => React.ReactNode);
31
+ panelClassName?: string;
32
+ bodyClassName?: string;
33
+ className?: string;
34
+ dataCy?: string;
35
+ name?: string;
36
+ }
37
+
38
+ export const FilterPopover: React.ComponentType<FilterPopoverProps>;
@@ -4,7 +4,8 @@ export type IconComponent = (
4
4
 
5
5
  export type CustomComponent = (props: any) => JSX.Element;
6
6
 
7
- export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
7
+ export interface InputProps
8
+ extends React.InputHTMLAttributes<HTMLInputElement> {
8
9
  label: string;
9
10
  placeholder?: string;
10
11
  type?:
@@ -33,6 +34,7 @@ export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement>
33
34
  iconPosition?: "left" | "right";
34
35
  isAnimated?: boolean;
35
36
  required?: boolean;
37
+ hideLabel?: boolean;
36
38
  disabled?: boolean;
37
39
  shouldRenderCustomComponent?: boolean;
38
40
  customComponent?: CustomComponent;
@@ -7,12 +7,14 @@ export type IconButtonRank =
7
7
 
8
8
  export type IconButtonSize = "sm" | "md" | "lg" | string;
9
9
 
10
- export interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
10
+ export interface IconButtonProps
11
+ extends React.ButtonHTMLAttributes<HTMLButtonElement> {
11
12
  rank?: IconButtonRank;
12
13
  size?: IconButtonSize;
13
14
  title?: string;
14
15
  iconName?: string;
15
16
  iconLibrary?: "hero" | "c247" | string;
17
+ icon?: React.ReactNode;
16
18
  isFullWidth?: boolean;
17
19
  className?: string;
18
20
  name?: string;
package/lib/index.d.ts CHANGED
@@ -9,6 +9,7 @@ export * from "./components/FooterLogo";
9
9
  export * from "./components/Forms/Checkbox";
10
10
  export * from "./components/Forms/Datepickers";
11
11
  export * from "./components/Forms/Dropdowns";
12
+ export * from "./components/Forms/FilterPopover";
12
13
  export * from "./components/Forms/Inputs";
13
14
  export * from "./components/Forms/Radios";
14
15
  export * from "./components/Forms/ToggleSwitch";