@happeouikit/form-elements 2.3.34 → 2.3.36

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.
@@ -1,3 +1,3 @@
1
1
  import { CheckboxProps } from "./Checkbox.types";
2
- declare const Checkbox: ({ label, indeterminate, onChange, style, disabled, checked, id, ...rest }: CheckboxProps) => import("react/jsx-runtime").JSX.Element;
2
+ declare const Checkbox: ({ label, subtitle, description, indeterminate, onChange, style, disabled, checked, id, background, "data-tip": dataTip, "data-tip-disable": dataTipDisable, ...props }: CheckboxProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default Checkbox;
@@ -1,11 +1,14 @@
1
1
  import { CSSProperties } from "react";
2
2
  interface BaseCheckboxProps {
3
3
  label?: string;
4
- indeterminate: boolean;
5
- disabled: boolean;
4
+ subtitle?: string;
5
+ description?: string;
6
+ indeterminate?: boolean;
7
+ disabled?: boolean;
8
+ background?: string;
6
9
  onChange: (newVal: boolean) => void | any;
7
10
  checked: boolean;
8
- style: CSSProperties;
11
+ style?: CSSProperties;
9
12
  id?: string;
10
13
  "data-testid"?: string;
11
14
  "data-tracker"?: string;
@@ -21,4 +24,22 @@ interface LabelCheckboxProps extends BaseCheckboxProps {
21
24
  "aria-label"?: never;
22
25
  }
23
26
  export type CheckboxProps = AriaLabelCheckboxProps | LabelCheckboxProps;
27
+ export interface CheckboxGroupOption {
28
+ label: string;
29
+ value: string;
30
+ background?: string;
31
+ disabled?: boolean;
32
+ onChange?: (newVal: boolean) => void;
33
+ }
34
+ export interface CheckboxGroupProps {
35
+ value?: string[];
36
+ disabled?: boolean;
37
+ name?: string;
38
+ children?: React.ReactNode;
39
+ className?: string;
40
+ options?: CheckboxGroupOption[];
41
+ onChange?: (newVal: string[]) => void;
42
+ defaultValue?: string[];
43
+ [key: string]: any;
44
+ }
24
45
  export {};
@@ -1,50 +1,3 @@
1
+ import { CheckboxGroupProps } from "./Checkbox.types";
2
+ declare const CheckboxGroup: ({ value, disabled, name, children, className, options: rawOptions, onChange: onGroupChange, defaultValue: groupDefaultValue, }: CheckboxGroupProps) => import("react/jsx-runtime").JSX.Element;
1
3
  export default CheckboxGroup;
2
- declare function CheckboxGroup({ value, disabled, name, children, className, options: rawOptions, onChange: onGroupChange, defaultValue: groupDefaultValue, }: {
3
- value: any;
4
- disabled: any;
5
- name: any;
6
- children: any;
7
- className: any;
8
- options: any;
9
- onChange: any;
10
- defaultValue: any;
11
- }): import("react/jsx-runtime").JSX.Element;
12
- declare namespace CheckboxGroup {
13
- namespace propTypes {
14
- let className: PropTypes.Requireable<string>;
15
- let options: PropTypes.Requireable<(NonNullable<string | PropTypes.InferProps<{
16
- label: PropTypes.Requireable<string>;
17
- value: PropTypes.Validator<string>;
18
- onChange: PropTypes.Requireable<(...args: any[]) => any>;
19
- }> | null | undefined> | null | undefined)[]>;
20
- let onChange: PropTypes.Requireable<(...args: any[]) => any>;
21
- let value: PropTypes.Requireable<(string | null | undefined)[]>;
22
- let defaultValue: PropTypes.Requireable<(string | null | undefined)[]>;
23
- let disabled: PropTypes.Requireable<boolean>;
24
- let name: PropTypes.Requireable<string>;
25
- let children: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
26
- type: PropTypes.Requireable<({ label, indeterminate, onChange, style, disabled, checked, id, ...rest }: import("./Checkbox.types").CheckboxProps) => import("react/jsx-runtime").JSX.Element>;
27
- }> | (PropTypes.InferProps<{
28
- type: PropTypes.Requireable<({ label, indeterminate, onChange, style, disabled, checked, id, ...rest }: import("./Checkbox.types").CheckboxProps) => import("react/jsx-runtime").JSX.Element>;
29
- }> | null | undefined)[] | null | undefined>>;
30
- }
31
- namespace defaultProps {
32
- let className_1: string;
33
- export { className_1 as className };
34
- let options_1: null;
35
- export { options_1 as options };
36
- let onChange_1: null;
37
- export { onChange_1 as onChange };
38
- let value_1: null;
39
- export { value_1 as value };
40
- let defaultValue_1: null;
41
- export { defaultValue_1 as defaultValue };
42
- let disabled_1: boolean;
43
- export { disabled_1 as disabled };
44
- let name_1: string;
45
- export { name_1 as name };
46
- let children_1: null;
47
- export { children_1 as children };
48
- }
49
- }
50
- import PropTypes from "prop-types";
@@ -1,19 +1,14 @@
1
- export default RadioButton;
2
- declare function RadioButton({ label, subtitle, description, ...props }: {
3
- [x: string]: any;
4
- label: any;
5
- subtitle: any;
6
- description: any;
7
- }): import("react/jsx-runtime").JSX.Element;
8
- declare namespace RadioButton {
9
- namespace propTypes {
10
- let label: PropTypes.Requireable<PropTypes.ReactNodeLike>;
11
- let subtitle: PropTypes.Requireable<PropTypes.ReactNodeLike>;
12
- let description: PropTypes.Requireable<PropTypes.ReactNodeLike>;
13
- }
14
- namespace defaultProps {
15
- let label_1: null;
16
- export { label_1 as label };
17
- }
18
- }
19
1
  import PropTypes from "prop-types";
2
+ import { RadioButtonProps } from "./RadioButton.types";
3
+ declare const RadioButton: {
4
+ ({ label, subtitle, description, background, id, ...props }: RadioButtonProps): import("react/jsx-runtime").JSX.Element;
5
+ propTypes: {
6
+ label: PropTypes.Requireable<PropTypes.ReactNodeLike>;
7
+ subtitle: PropTypes.Requireable<PropTypes.ReactNodeLike>;
8
+ description: PropTypes.Requireable<PropTypes.ReactNodeLike>;
9
+ };
10
+ defaultProps: {
11
+ label: null;
12
+ };
13
+ };
14
+ export default RadioButton;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ export interface RadioButtonProps {
3
+ label?: React.ReactNode;
4
+ subtitle?: React.ReactNode;
5
+ description?: React.ReactNode;
6
+ id?: string;
7
+ background?: string;
8
+ [key: string]: any;
9
+ }