@luscii-healthtech/web-ui 7.6.0 → 7.6.2

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,17 +1,53 @@
1
1
  import React from "react";
2
2
  import "./Checkbox.scss";
3
3
  export interface CheckboxProps {
4
+ /**
5
+ * ID used for semantic targeting, as can be used in attributes like `<label htmlFor="some-id">`.
6
+ */
4
7
  id?: string;
8
+ /**
9
+ * The visible text labeling the checkbox element.
10
+ */
5
11
  text?: string;
12
+ /**
13
+ * Helper text that adds some more information on what the option means, or inform
14
+ * the user about the consequences of the checkbox.
15
+ */
6
16
  explanation?: string;
17
+ /**
18
+ * Shows a different checkbox variant. `type="switch"` shows a switch-like component
19
+ * without a visual label.
20
+ */
7
21
  type?: "regular" | "switch";
22
+ /**
23
+ * Set the value.
24
+ * Same as `checked` on `<input type="checkbox" />`.
25
+ */
8
26
  isChecked?: boolean;
27
+ /**
28
+ * Value for when it is not clear if the state of this checkbox
29
+ * is "checked" or not (for hierarchical checkboxes).
30
+ */
9
31
  isIndeterminate?: boolean;
32
+ /**
33
+ * Disallow the user to change the checkbox value.
34
+ * Same as `disabled` on `<input type="checkbox" />`.
35
+ */
10
36
  isDisabled?: boolean;
37
+ /**
38
+ * The name that the value of the checkbox will be associated with.
39
+ * Same as `name` on `<input type="checkbox" />`.
40
+ */
11
41
  name?: string;
42
+ /**
43
+ * This can be used to retrieve the value it is referring to through onChange.
44
+ */
12
45
  value?: string;
13
46
  onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
14
47
  className?: string;
48
+ /**
49
+ * Visually show that the currently selected value has an issue the user needs to attend to.
50
+ */
15
51
  error?: boolean;
16
52
  innerRef?: React.Ref<HTMLInputElement>;
17
53
  }
@@ -53,5 +53,5 @@ export interface InputProps extends CustomHTMLInputProps {
53
53
  */
54
54
  asFormField?: boolean;
55
55
  }
56
- declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
56
+ export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
57
57
  export default Input;