opus-toolkit-components 1.8.7 → 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,11 @@
1
+ export type CalloutTone = "green" | "amber" | "red" | "pink";
2
+
3
+ export interface CalloutProps extends React.HTMLAttributes<HTMLDivElement> {
4
+ message: string;
5
+ tone?: CalloutTone;
6
+ className?: string;
7
+ name?: string;
8
+ dataCy?: string;
9
+ }
10
+
11
+ export const Callout: React.FC<CalloutProps>;
@@ -9,8 +9,39 @@ export type CardIntent =
9
9
 
10
10
  export interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
11
11
  intent?: CardIntent;
12
+ hasOutline?: boolean;
12
13
  className?: string;
13
14
  children?: React.ReactNode;
14
15
  }
15
16
 
16
17
  export const Card: React.ComponentType<CardProps>;
18
+
19
+ export interface FileUploadCardProps
20
+ extends React.HTMLAttributes<HTMLDivElement> {
21
+ fileName: string;
22
+ uploadedDate: string;
23
+ previewSrc?: string;
24
+ previewAlt?: string;
25
+ preview?: React.ReactNode;
26
+ action?: React.ReactNode;
27
+ downloadTitle?: string;
28
+ onDownload?: (event: React.MouseEvent<HTMLButtonElement>) => void;
29
+ className?: string;
30
+ }
31
+
32
+ export const FileUploadCard: React.ComponentType<FileUploadCardProps>;
33
+
34
+ export interface CardItemProps extends React.HTMLAttributes<HTMLDivElement> {
35
+ heading: React.ReactNode;
36
+ subheading?: React.ReactNode;
37
+ icon?: React.ReactNode;
38
+ checked?: boolean;
39
+ onCheckedChange?: (checked: boolean) => void;
40
+ iconPosition?: "left" | "right";
41
+ disabled?: boolean;
42
+ className?: string;
43
+ dataCy?: string;
44
+ name?: string;
45
+ }
46
+
47
+ export const CardItem: React.ComponentType<CardItemProps>;
@@ -0,0 +1,6 @@
1
+ export interface FooterLogoProps extends React.HTMLAttributes<HTMLDivElement> {
2
+ href?: string;
3
+ className?: string;
4
+ }
5
+
6
+ export const FooterLogo: React.FC<FooterLogoProps>;
@@ -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;
@@ -0,0 +1,15 @@
1
+ export interface ToggleSwitchProps
2
+ extends React.HTMLAttributes<HTMLDivElement> {
3
+ checked: boolean;
4
+ onChange?: (checked: boolean) => void;
5
+ onToggle?: (checked: boolean) => void;
6
+ leftLabel?: React.ReactNode;
7
+ rightLabel?: React.ReactNode;
8
+ disabled?: boolean;
9
+ name?: string;
10
+ title?: string;
11
+ dataCy?: string;
12
+ className?: string;
13
+ }
14
+
15
+ export const ToggleSwitch: React.ComponentType<ToggleSwitchProps>;
@@ -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;
@@ -3,6 +3,21 @@ export interface PillProps extends React.HTMLAttributes<HTMLSpanElement> {
3
3
  status?: "primary" | "danger" | "warning" | "success" | "info" | "notice";
4
4
  className?: string;
5
5
  icon?: (props: React.SVGProps<SVGSVGElement>) => JSX.Element;
6
+ iconPosition?: "left" | "right";
7
+ onIconClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
6
8
  }
7
9
 
8
10
  export const Pill: React.FC<PillProps>;
11
+
12
+ export interface PillButtonProps
13
+ extends React.ButtonHTMLAttributes<HTMLButtonElement> {
14
+ label: React.ReactNode;
15
+ active?: boolean;
16
+ className?: string;
17
+ name?: string;
18
+ dataCy?: string;
19
+ onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
20
+ onPress?: (event: React.MouseEvent<HTMLButtonElement>) => void;
21
+ }
22
+
23
+ export const PillButton: React.FC<PillButtonProps>;
package/lib/index.d.ts CHANGED
@@ -1,14 +1,18 @@
1
1
  export * from "./components/Accordions";
2
2
  export * from "./components/BarLayout";
3
3
  export * from "./components/Buttons";
4
+ export * from "./components/Callout";
4
5
  export * from "./components/Cards";
5
6
  export * from "./components/Cookie";
6
7
  export * from "./components/Footer";
8
+ export * from "./components/FooterLogo";
7
9
  export * from "./components/Forms/Checkbox";
8
10
  export * from "./components/Forms/Datepickers";
9
11
  export * from "./components/Forms/Dropdowns";
12
+ export * from "./components/Forms/FilterPopover";
10
13
  export * from "./components/Forms/Inputs";
11
14
  export * from "./components/Forms/Radios";
15
+ export * from "./components/Forms/ToggleSwitch";
12
16
  export * from "./components/Header";
13
17
  export * from "./components/Icon";
14
18
  export * from "./components/IconButton";