@ofgdev/ui-components 1.2.6 → 1.2.8

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,29 @@
1
+ import { default as React } from 'react';
2
+ type CheckBoxInputGroupProps = {
3
+ name?: string;
4
+ className?: string;
5
+ children: React.ReactNode;
6
+ defaultValue?: string | string[];
7
+ value?: string | string[];
8
+ onChange?: (value: string | string[]) => void;
9
+ multiple?: boolean;
10
+ errorMessage?: string;
11
+ description?: string;
12
+ required?: boolean;
13
+ optional?: boolean;
14
+ label?: string;
15
+ labelSize?: import('../Heading/Heading').HeadingSize;
16
+ vertical?: boolean;
17
+ };
18
+ interface CheckBoxInputGroupContextType {
19
+ name?: string;
20
+ selectedItems: string | string[];
21
+ updateSelection: (value: string, checked: boolean) => void;
22
+ multiple: boolean;
23
+ }
24
+ export interface CheckBoxInputGroupRef {
25
+ getSelectedValues: () => string | string[];
26
+ }
27
+ export declare const CheckBoxInputGroupContext: React.Context<CheckBoxInputGroupContextType | null>;
28
+ export declare const CheckBoxInputGroup: React.ForwardRefExoticComponent<CheckBoxInputGroupProps & React.RefAttributes<CheckBoxInputGroupRef>>;
29
+ export default CheckBoxInputGroup;
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ type CheckBoxInputItemProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "checked"> & {
3
+ className?: string;
4
+ label: string;
5
+ value: string;
6
+ name?: string;
7
+ onChange?: (checked: boolean, value: string) => void;
8
+ };
9
+ export declare const CheckBoxInputItem: ({ className, label, value, name, onChange, ...props }: CheckBoxInputItemProps) => import("react/jsx-runtime").JSX.Element;
10
+ export default CheckBoxInputItem;
@@ -0,0 +1,4 @@
1
+ export { CheckBoxInput } from './CheckBoxInput';
2
+ export { CheckBoxInputGroup } from './CheckBoxInputGroup';
3
+ export { CheckBoxInputItem } from './CheckBoxInputItem';
4
+ export type { CheckBoxInputGroupRef } from './CheckBoxInputGroup';
@@ -1,5 +1,6 @@
1
1
  interface ModalProps {
2
2
  className?: string;
3
+ bodyClassName?: string;
3
4
  children?: React.ReactNode;
4
5
  primaryButtonText?: string;
5
6
  secondaryButtonText?: string;
@@ -17,7 +18,9 @@ interface ModalProps {
17
18
  title?: string;
18
19
  titleClassName?: string;
19
20
  isOpen?: boolean;
21
+ primaryButtonVariant?: "primary" | "secondary" | "ghost-primary" | "ghost-secondary" | "ghost-tertiary" | "danger";
22
+ secondaryButtonVariant?: "primary" | "secondary" | "ghost-primary" | "ghost-secondary" | "ghost-tertiary" | "danger";
20
23
  size?: "sm" | "md" | "lg";
21
24
  }
22
- export declare const Modal: ({ className, primaryButtonText, secondaryButtonText, onPrimaryButtonClick, onSecondaryButtonClick, secondaryButtonClassName, primaryButtonClassName, primaryButtonIsLoading, secondaryButtonIsLoading, children, title, titleClassName, isOpen, primaryButtonLoadingMessage, secondaryButtonLoadingMessage, onClose, size, showHeader, showFooter, ...props }: ModalProps) => import("react/jsx-runtime").JSX.Element;
25
+ export declare const Modal: import('react').ForwardRefExoticComponent<ModalProps & import('react').RefAttributes<HTMLDivElement>>;
23
26
  export default Modal;
@@ -1,5 +1,5 @@
1
1
  import { CountryCode } from './countryCodes';
2
- interface PhoneNumberInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
2
+ interface PhoneNumberInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "defaultValue"> {
3
3
  value?: string;
4
4
  label?: string;
5
5
  labelSize?: import('../Heading/Heading').HeadingSize;
@@ -7,6 +7,8 @@ interface PhoneNumberInputProps extends React.InputHTMLAttributes<HTMLInputEleme
7
7
  description?: string;
8
8
  optional?: boolean;
9
9
  inputClassName?: string;
10
+ name?: string;
11
+ defaultValue?: string;
10
12
  countryCode?: CountryCode;
11
13
  }
12
14
  export declare const PhoneNumberInput: import('react').ForwardRefExoticComponent<PhoneNumberInputProps & import('react').RefAttributes<HTMLInputElement>>;
@@ -2,21 +2,22 @@ import { default as React, CSSProperties, ReactElement, ReactNode } from 'react'
2
2
  export type PopoverPlacement = "top" | "bottom" | "left" | "right";
3
3
  interface PopoverProps {
4
4
  children: ReactNode;
5
- }
6
- export declare const Popover: React.FC<PopoverProps>;
7
- interface PopoverTriggerProps {
8
- children: ReactElement;
5
+ className?: string;
6
+ style?: CSSProperties;
9
7
  }
10
8
  interface PopoverTriggerProps {
11
9
  children: ReactElement;
12
10
  openOn?: "hover" | "click";
11
+ className?: string;
12
+ style?: CSSProperties;
13
13
  }
14
- export declare const PopoverTrigger: React.FC<PopoverTriggerProps>;
15
14
  interface PopoverContentProps {
16
15
  children: ReactNode;
17
16
  className?: string;
18
17
  style?: CSSProperties;
19
18
  placement?: PopoverPlacement;
20
19
  }
20
+ export declare const Popover: React.FC<PopoverProps>;
21
+ export declare const PopoverTrigger: React.FC<PopoverTriggerProps>;
21
22
  export declare const PopoverContent: React.FC<PopoverContentProps>;
22
23
  export {};
@@ -2,7 +2,7 @@ interface Option {
2
2
  value: string;
3
3
  label: string | number;
4
4
  }
5
- interface RadioInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
5
+ interface RadioInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "defaultValue"> {
6
6
  label?: string;
7
7
  labelSize?: import('../Heading/Heading').HeadingSize;
8
8
  options: Option[];